Rules for integrands of the form (((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)

1:  ∫(a+b Sin[e+f x]) (c+d Sin[e+f x])dx  when  b c-a d≠0

Derivation: Algebraic expansion

Basis: (a+b z) (c+d z)==(1/2) (2 a c+b d)+(b c+a d) z-(1/2) b d (1-2 (z^2))

Rule: If  b c-a d≠0, then

∫(a+b Sin[e+f x])(c+d Sin[e+f x])dx  ⟶  (((2 a c+b d)x)/2)-(((b c+a d) Cos[e+f x])/f)-((b d Cos[e+f x] Sin[e+f x])/(2 f))

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])*(c_.+d_.*sin[e_.+f_.*x_]),x_Symbol] :=
  (2*a*c+b*d)*x/2 - (b*c+a*d)*Cos[e+f*x]/f - b*d*Cos[e+f*x]*Sin[e+f*x]/(2*f) /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0]

2:  ∫((a+b Sin[e+f x])/(c+d Sin[e+f x]))dx  when  b c-a d≠0

Reference: G&R 2.551.2

Derivation: Algebraic expansion

Basis: ((a+b z)/(c+d z))==(b/d)-((b c-a d)/(d (c+d z)))

Rule: If  b c-a d≠0, then

∫((a+b Sin[e+f x])/(c+d Sin[e+f x]))dx  ⟶  ((b x)/d)-((b c-a d)/d)∫(1/(c+d Sin[e+f x]))dx

Program code:

Int[(a_.+b_.*sin[e_.+f_.*x_])/(c_.+d_.*sin[e_.+f_.*x_]),x_Symbol] :=
  b*x/d - (b*c-a*d)/d*Int[1/(c+d*Sin[e+f*x]),x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0]

3.  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0

1:  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m∈ℤ

Derivation: Algebraic simplification

Basis: If  b c+a d==0 ∧ (a^2)-(b^2)==0, then (a+b Sin[z]) (c+d Sin[z])==a c ((Cos[z])^2)

Rule: If  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m∈ℤ, then

∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  ⟶  (a^m) (c^m)∫((Cos[e+f x])^(2m)) (((c+d Sin[e+f x]))^(n-m))dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_.*(c_+d_.*sin[e_.+f_.*x_])^n_.,x_Symbol] :=
  a^m*c^m*Int[Cos[e+f*x]^(2*m)*(c+d*Sin[e+f*x])^(n-m),x] /;
FreeQ[{a,b,c,d,e,f,n},x] && EqQ[b*c+a*d,0] && EqQ[a^2-b^2,0] && IntegerQ[m] && Not[IntegerQ[n] && (LtQ[m,0] && GtQ[n,0] || LtQ[0,n,m] || LtQ[m,n,0])]

2.  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m∉ℤ ∧ n∉ℤ

1.  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m+(1/2)∈(SuperPlus[ℤ])

1.  ∫(Sqrt[a+b Sin[e+f x]]) (((c+d Sin[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0

1:  ∫((Sqrt[a+b Sin[e+f x]])/(Sqrt[c+d Sin[e+f x]]))dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0

Derivation: Piecewise constant extraction

Basis: If  b c+a d==0 ∧ (a^2)-(b^2)==0, then (∂_x)((Cos[e+f x])/((Sqrt[a+b Sin[e+f x]]) (Sqrt[c+d Sin[e+f x]])))==0

Rule: If  b c+a d==0 ∧ (a^2)-(b^2)==0, then

∫((Sqrt[a+b Sin[e+f x]])/(Sqrt[c+d Sin[e+f x]]))dx  ⟶  ((a c Cos[e+f x])/((Sqrt[a+b Sin[e+f x]]) (Sqrt[c+d Sin[e+f x]])))∫((Cos[e+f x])/(c+d Sin[e+f x]))dx

Program code:

Int[Sqrt[a_+b_.*sin[e_.+f_.*x_]]/Sqrt[c_+d_.*sin[e_.+f_.*x_]],x_Symbol] :=
  a*c*Cos[e+f*x]/(Sqrt[a+b*Sin[e+f*x]]*Sqrt[c+d*Sin[e+f*x]])*Int[Cos[e+f*x]/(c+d*Sin[e+f*x]),x] /;
FreeQ[{a,b,c,d,e,f},x] && EqQ[b*c+a*d,0] && EqQ[a^2-b^2,0]

2:  ∫(Sqrt[a+b Sin[e+f x]]) (((c+d Sin[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ n≠-(1/2)

Derivation: Doubly degenerate sine recurrence 1a with p->0

Rule: If  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ n≠-(1/2), then

∫(Sqrt[a+b Sin[e+f x]]) (((c+d Sin[e+f x]))^n)dx  ⟶  -((2b Cos[e+f x](((c+d Sin[e+f x]))^n))/(f(2 n+1)(Sqrt[a+b Sin[e+f x]])))

Program code:

Int[Sqrt[a_+b_.*sin[e_.+f_.*x_]]*(c_+d_.*sin[e_.+f_.*x_])^n_,x_Symbol] :=
  -2*b*Cos[e+f*x]*(c+d*Sin[e+f*x])^n/(f*(2*n+1)*Sqrt[a+b*Sin[e+f*x]]) /;
FreeQ[{a,b,c,d,e,f,n},x] && EqQ[b*c+a*d,0] && EqQ[a^2-b^2,0] && NeQ[n,-1/2]

2.  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m-(1/2)∈(SuperPlus[ℤ])

1:  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m-(1/2)∈(SuperPlus[ℤ]) ∧ n<-1

Derivation: Doubly degenerate sine recurrence 1a with p->0

Rule: If  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m-(1/2)∈(SuperPlus[ℤ]) ∧ n<-1, then

∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  ⟶  
-((2b Cos[e+f x](((a+b Sin[e+f x]))^(m-1)) (((c+d Sin[e+f x]))^n))/(f(2 n+1)))-((b (2 m-1))/(d (2 n+1)))∫(((a+b Sin[e+f x]))^(m-1)) (((c+d Sin[e+f x]))^(n+1)) dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_+d_.*sin[e_.+f_.*x_])^n_,x_Symbol] :=
  -2*b*Cos[e+f*x]*(a+b*Sin[e+f*x])^(m-1)*(c+d*Sin[e+f*x])^n/(f*(2*n+1)) - 
  b*(2*m-1)/(d*(2*n+1))*Int[(a+b*Sin[e+f*x])^(m-1)*(c+d*Sin[e+f*x])^(n+1),x] /;
FreeQ[{a,b,c,d,e,f},x] && EqQ[b*c+a*d,0] && EqQ[a^2-b^2,0] && IGtQ[m-1/2,0] && LtQ[n,-1] && Not[ILtQ[m+n,0] && GtQ[2*m+n+1,0]]

2:  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m-(1/2)∈(SuperPlus[ℤ])∧ n≮-1

Derivation: Doubly degenerate sine recurrence 1b with p->0

Rule: If  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m-(1/2)∈(SuperPlus[ℤ])∧ n≮-1, then

∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  ⟶  
-((b Cos[e+f x](((a+b Sin[e+f x]))^(m-1)) (((c+d Sin[e+f x]))^n))/(f(m+n)))+((a(2 m-1))/(m+n))∫(((a+b Sin[e+f x]))^(m-1)) (((c+d Sin[e+f x]))^n)dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_+d_.*sin[e_.+f_.*x_])^n_,x_Symbol] :=
  -b*Cos[e+f*x]*(a+b*Sin[e+f*x])^(m-1)*(c+d*Sin[e+f*x])^n/(f*(m+n)) + 
  a*(2*m-1)/(m+n)*Int[(a+b*Sin[e+f*x])^(m-1)*(c+d*Sin[e+f*x])^n,x] /;
FreeQ[{a,b,c,d,e,f,n},x] && EqQ[b*c+a*d,0] && EqQ[a^2-b^2,0] && IGtQ[m-1/2,0] && Not[LtQ[n,-1]] && 
  Not[IGtQ[n-1/2,0] && LtQ[n,m]] && Not[ILtQ[m+n,0] && GtQ[2*m+n+1,0]]

2.  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m+n∈(SuperMinus[ℤ])

1.  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m+n+1==0

1:  ∫(1/((Sqrt[a+b Sin[e+f x]]) (Sqrt[c+d Sin[e+f x]])))dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0

Derivation: Piecewise constant extraction

Basis: If  b c+a d==0 ∧ (a^2)-(b^2)==0, then (∂_x)((Cos[e+f x])/((Sqrt[a+b Sin[e+f x]]) (Sqrt[c+d Sin[e+f x]])))==0

Rule: If  b c+a d==0 ∧ (a^2)-(b^2)==0, then

∫(1/((Sqrt[a+b Sin[e+f x]]) (Sqrt[c+d Sin[e+f x]])))dx  ⟶  ((Cos[e+f x])/((Sqrt[a+b Sin[e+f x]]) (Sqrt[c+d Sin[e+f x]])))∫(1/(Cos[e+f x]))dx

Program code:

Int[1/(Sqrt[a_+b_.*sin[e_.+f_.*x_]]*Sqrt[c_+d_.*sin[e_.+f_.*x_]]),x_Symbol] :=
  Cos[e+f*x]/(Sqrt[a+b*Sin[e+f*x]]*Sqrt[c+d*Sin[e+f*x]])*Int[1/Cos[e+f*x],x] /;
FreeQ[{a,b,c,d,e,f},x] && EqQ[b*c+a*d,0] && EqQ[a^2-b^2,0]

2:  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m+n+1==0 ∧ m≠-(1/2)

Derivation: Doubly degenerate sine recurrence 1c with n->-m-1,p->0

Rule: If  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m+n+1==0 ∧ m≠-(1/2), then

∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  ⟶  ((b Cos[e+f x](((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n))/(a f(2 m+1)))

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_+d_.*sin[e_.+f_.*x_])^n_,x_Symbol] :=
  b*Cos[e+f*x]*(a+b*Sin[e+f*x])^m*(c+d*Sin[e+f*x])^n/(a*f*(2*m+1)) /;
FreeQ[{a,b,c,d,e,f,m,n},x] && EqQ[b*c+a*d,0] && EqQ[a^2-b^2,0] && EqQ[m+n+1,0] && NeQ[m,-1/2]

2:  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m+n+1∈(SuperMinus[ℤ])∧ m≠-(1/2)

Derivation: Doubly degenerate sine recurrence 1c with p->0

Rule: If  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m+n+1∈(SuperMinus[ℤ])∧ m≠-(1/2), then

∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  ⟶  
((b Cos[e+f x](((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n))/(a f(2 m+1)))+((m+n+1)/(a(2 m+1)))∫(((a+b Sin[e+f x]))^(m+1)) (((c+d Sin[e+f x]))^n)dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_+d_.*sin[e_.+f_.*x_])^n_,x_Symbol] :=
  b*Cos[e+f*x]*(a+b*Sin[e+f*x])^m*(c+d*Sin[e+f*x])^n/(a*f*(2*m+1)) + 
  (m+n+1)/(a*(2*m+1))*Int[(a+b*Sin[e+f*x])^(m+1)*(c+d*Sin[e+f*x])^n,x] /;
FreeQ[{a,b,c,d,e,f,m,n},x] && EqQ[b*c+a*d,0] && EqQ[a^2-b^2,0] && ILtQ[Simplify[m+n+1],0] && NeQ[m,-1/2] && 
  (SumSimplerQ[m,1] || Not[SumSimplerQ[n,1]])

3:  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m<-1

Derivation: Doubly degenerate sine recurrence 1c with p->0

Rule: If  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m<-1, then

∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  ⟶  
((b Cos[e+f x](((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n))/(a f(2 m+1)))+((m+n+1)/(a(2 m+1)))∫(((a+b Sin[e+f x]))^(m+1)) (((c+d Sin[e+f x]))^n)dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_+d_.*sin[e_.+f_.*x_])^n_,x_Symbol] :=
  b*Cos[e+f*x]*(a+b*Sin[e+f*x])^m*(c+d*Sin[e+f*x])^n/(a*f*(2*m+1)) + 
  (m+n+1)/(a*(2*m+1))*Int[(a+b*Sin[e+f*x])^(m+1)*(c+d*Sin[e+f*x])^n,x] /;
FreeQ[{a,b,c,d,e,f,n},x] && EqQ[b*c+a*d,0] && EqQ[a^2-b^2,0] && LtQ[m,-1] && Not[LtQ[m,n,-1]] && IntegersQ[2*m,2*n]

4:  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m∉ℤ ∧ n∉ℤ

Derivation: Piecewise constant extraction

Basis: If  b c+a d==0 ∧ (a^2)-(b^2)==0, then (∂_x)(((((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^m))/((Cos[e+f x])^(2m)))==0

Rule: If  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m∉ℤ ∧ n∉ℤ, then

∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  ⟶  
(((a^(IntPart[m])) (c^(IntPart[m])) (((a+b Sin[e+f x]))^(FracPart[m])) (((c+d Sin[e+f x]))^(FracPart[m])))/((Cos[e+f x])^(2FracPart[m])))∫((Cos[e+f x])^(2m)) (((c+d Sin[e+f x]))^(n-m))dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_+d_.*sin[e_.+f_.*x_])^n_,x_Symbol] :=
  a^IntPart[m]*c^IntPart[m]*(a+b*Sin[e+f*x])^FracPart[m]*(c+d*Sin[e+f*x])^FracPart[m]/Cos[e+f*x]^(2*FracPart[m])*
    Int[Cos[e+f*x]^(2*m)*(c+d*Sin[e+f*x])^(n-m),x] /;
FreeQ[{a,b,c,d,e,f,m,n},x] && EqQ[b*c+a*d,0] && EqQ[a^2-b^2,0] && (FractionQ[m] || Not[FractionQ[n]])

4:  ∫((((a+b Sin[e+f x]))^2)/(c+d Sin[e+f x]))dx  when  b c-a d≠0

Derivation: Algebraic expansion

Basis: ((((a+b z))^2)/(c+d z))==(((b^2) z)/d)+(((a^2) d-b (b c-2 a d) z)/(d (c+d z)))

Rule: If  b c-a d≠0, then

∫((((a+b Sin[e+f x]))^2)/(c+d Sin[e+f x]))dx  ⟶  -(((b^2)Cos[e+f x])/(d f))+(1/d)∫(((a^2) d-b (b c-2 a d) Sin[e+f x])/(c+d Sin[e+f x]))dx

Program code:

Int[(a_.+b_.*sin[e_.+f_.*x_])^2/(c_.+d_.*sin[e_.+f_.*x_]),x_Symbol] :=
  -b^2*Cos[e+f*x]/(d*f) + 1/d*Int[Simp[a^2*d-b*(b*c-2*a*d)*Sin[e+f*x],x]/(c+d*Sin[e+f*x]),x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0]

5:  ∫(1/((a+b Sin[e+f x])(c+d Sin[e+f x])))dx  when  b c-a d≠0

Derivation: Algebraic expansion

Basis: (1/((a+b z)(c+d z)))==(b/((b c-a d) (a+b z)))-(d/((b c-a d) (c+d z)))

Rule: If  b c-a d≠0, then

∫(1/((a+b Sin[e+f x])(c+d Sin[e+f x])))dx  ⟶  (b/(b c-a d))∫(1/(a+b Sin[e+f x]))dx-(d/(b c-a d))∫(1/(c+d Sin[e+f x]))dx

Program code:

Int[1/((a_.+b_.*sin[e_.+f_.*x_])*(c_.+d_.*sin[e_.+f_.*x_])),x_Symbol] :=
  b/(b*c-a*d)*Int[1/(a+b*Sin[e+f*x]),x] - d/(b*c-a*d)*Int[1/(c+d*Sin[e+f*x]),x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0]

6.  ∫(((a+b Sin[e+f x]))^m)(c+d Sin[e+f x])dx  when  b c-a d≠0

1:  ∫(((b Sin[e+f x]))^m)(c+d Sin[e+f x])dx

Derivation: Algebraic expansion

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0, then

∫(((b Sin[e+f x]))^m)(c+d Sin[e+f x])dx  ⟶  c∫(((b Sin[e+f x]))^m)dx+(d/b)∫(((b Sin[e+f x]))^(m+1))dx

Program code:

Int[(b_.*sin[e_.+f_.*x_])^m_*(c_+d_.*sin[e_.+f_.*x_]),x_Symbol] :=
  c*Int[(b*Sin[e+f*x])^m,x] + d/b*Int[(b*Sin[e+f*x])^(m+1),x] /;
FreeQ[{b,c,d,e,f,m},x]

2.  ∫(((a+b Sin[e+f x]))^m)(c+d Sin[e+f x])dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0

1:  ∫(((a+b Sin[e+f x]))^m)(c+d Sin[e+f x])dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ a d m+b c (m+1)==0

Derivation: Singly degenerate sine recurrence 2a with A->-((a d m)/(b (m+1))),B->d,n->0,p->0

Derivation: Singly degenerate sine recurrence 2c with A->-((a d m)/(b (m+1))),B->d,n->0,p->0

Note: If  (a^2)-(b^2)==0 ∧ a d m+b c (m+1)==0, then m+1≠0.

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ a d m+b c (m+1)==0 , then

∫(((a+b Sin[e+f x]))^m)(c+d Sin[e+f x])dx  ⟶  -((d Cos[e+f x](((a+b Sin[e+f x]))^m))/(f(m+1)))

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_+d_.*sin[e_.+f_.*x_]),x_Symbol] :=
  -d*Cos[e+f*x]*(a+b*Sin[e+f*x])^m/(f*(m+1)) /;
FreeQ[{a,b,c,d,e,f,m},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && EqQ[a*d*m+b*c*(m+1),0]

2:  ∫(((a+b Sin[e+f x]))^m)(c+d Sin[e+f x])dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ m<-(1/2)

Derivation: Singly degenerate sine recurrence 2a with A->c,B->d,n->0,p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ m<-(1/2), then

∫(((a+b Sin[e+f x]))^m)(c+d Sin[e+f x])dx  ⟶  
(((b c-a d) Cos[e+f x](((a+b Sin[e+f x]))^m))/(a f (2m+1)))+((a d m+b c(m+1))/(a b(2m+1)))∫(((a+b Sin[e+f x]))^(m+1))dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_.+d_.*sin[e_.+f_.*x_]),x_Symbol] :=
  (b*c-a*d)*Cos[e+f*x]*(a+b*Sin[e+f*x])^m/(a*f*(2*m+1)) + 
  (a*d*m+b*c*(m+1))/(a*b*(2*m+1))*Int[(a+b*Sin[e+f*x])^(m+1),x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && LtQ[m,-1/2]

3:  ∫(((a+b Sin[e+f x]))^m)(c+d Sin[e+f x])dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ m≮-(1/2)

Derivation: Singly degenerate sine recurrence 2c with A->c,B->d,n->0,p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ m≮-(1/2) , then

∫(((a+b Sin[e+f x]))^m)(c+d Sin[e+f x])dx  ⟶  
-((d Cos[e+f x](((a+b Sin[e+f x]))^m))/(f(m+1)))+((a d m+b c(m+1))/(b (m+1)))∫ (((a+b Sin[e+f x]))^m)dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_.+d_.*sin[e_.+f_.*x_]),x_Symbol] :=
  -d*Cos[e+f*x]*(a+b*Sin[e+f*x])^m/(f*(m+1)) + 
  (a*d*m+b*c*(m+1))/(b*(m+1))*Int[(a+b*Sin[e+f*x])^m,x] /;
FreeQ[{a,b,c,d,e,f,m},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && Not[LtQ[m,-1/2]]

3.  ∫(((a+b Sin[e+f x]))^m)(c+d Sin[e+f x])dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0

1.  ∫(((a+b Sin[e+f x]))^m)(c+d Sin[e+f x])dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ 2m∈ℤ

1:  ∫((c+d Sin[e+f x])/(Sqrt[a+b Sin[e+f x]]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0

Derivation: Algebraic expansion

Basis: c+d z==((b c-a d)/b)+(d/b)(a+b z)

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0, then

∫((c+d Sin[e+f x])/(Sqrt[a+b Sin[e+f x]]))dx  ⟶  ((b c-a d)/b)∫(1/(Sqrt[a+b Sin[e+f x]]))dx+(d/b)∫(Sqrt[a+b Sin[e+f x]])dx

Program code:

Int[(c_.+d_.*sin[e_.+f_.*x_])/Sqrt[a_+b_.*sin[e_.+f_.*x_]],x_Symbol] :=
  (b*c-a*d)/b*Int[1/Sqrt[a+b*Sin[e+f*x]],x] + d/b*Int[Sqrt[a+b*Sin[e+f*x]],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0]

2:  ∫(((a+b Sin[e+f x]))^m)(c+d Sin[e+f x])dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ m>0 ∧ 2m∈ℤ

Reference: G&R 2.551.1 inverted

Derivation: Nondegenerate sine recurrence 1b with A->a c,B->b c+a d,C->b d,m->0,n->n-1,p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ m>0 ∧ 2m∈ℤ, then

∫(((a+b Sin[e+f x]))^m)(c+d Sin[e+f x])dx  ⟶  
-((d Cos[e+f x](((a+b Sin[e+f x]))^m))/(f (m+1)))+(1/(m+1))∫(((a+b Sin[e+f x]))^(m-1))(b d m+a c (m+1)+(a d m+b c (m+1)) Sin[e+f x])dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_.+d_.*sin[e_.+f_.*x_]),x_Symbol] :=
  -d*Cos[e+f*x]*(a+b*Sin[e+f*x])^m/(f*(m+1)) + 
  1/(m+1)*Int[(a+b*Sin[e+f*x])^(m-1)*Simp[b*d*m+a*c*(m+1)+(a*d*m+b*c*(m+1))*Sin[e+f*x],x],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && GtQ[m,0] && IntegerQ[2*m]

3:  ∫(((a+b Sin[e+f x]))^m)(c+d Sin[e+f x])dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ m<-1 ∧ 2m∈ℤ

Reference: G&R 2.551.1

Derivation: Nondegenerate sine recurrence 1a with A->c,B->d,C->0,n->0,p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ m<-1 ∧ 2m∈ℤ, then

∫(((a+b Sin[e+f x]))^m)(c+d Sin[e+f x])dx  ⟶  
-(((b c-a d) Cos[e+f x](((a+b Sin[e+f x]))^(m+1)))/(f (m+1) ((a^2)-(b^2))))+(1/((m+1) ((a^2)-(b^2))))∫(((a+b Sin[e+f x]))^(m+1))((a c-b d)(m+1)-(b c-a d)(m+2)Sin[e+f x])dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_.+d_.*sin[e_.+f_.*x_]),x_Symbol] :=
  -(b*c-a*d)*Cos[e+f*x]*(a+b*Sin[e+f*x])^(m+1)/(f*(m+1)*(a^2-b^2)) + 
  1/((m+1)*(a^2-b^2))*Int[(a+b*Sin[e+f*x])^(m+1)*Simp[(a*c-b*d)*(m+1)-(b*c-a*d)*(m+2)*Sin[e+f*x],x],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && LtQ[m,-1] && IntegerQ[2*m]

2.  ∫(((a+b Sin[e+f x]))^m)(c+d Sin[e+f x])dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ 2m∉ℤ

1:  ∫(((a+b Sin[e+f x]))^m) (c+d Sin[e+f x])dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ 2m∉ℤ ∧ (c^2)-(d^2)==0

Derivation: Piecewise constant extraction and integration by substitution

Basis: (∂_x)((Cos[e+f x])/((Sqrt[1+Sin[e+f x]]) (Sqrt[1-Sin[e+f x]])))==0

Basis: Cos[e+f x]==(1/f)(∂_x)Sin[e+f x]

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ 2m∉ℤ ∧ (c^2)-(d^2)==0, then

∫(((a+b Sin[e+f x]))^m) (c+d Sin[e+f x])dx  ⟶  

((c Cos[e+f x])/((Sqrt[1+Sin[e+f x]]) (Sqrt[1-Sin[e+f x]])))∫((Cos[e+f x] (((a+b Sin[e+f x]))^m) (Sqrt[1+(d/c) Sin[e+f x]]))/(Sqrt[1-(d/c) Sin[e+f x]]))dx  ⟶  

((c Cos[e+f x])/(f (Sqrt[1+Sin[e+f x]]) (Sqrt[1-Sin[e+f x]])))Subst[∫(((((a+b x))^m) (Sqrt[1+(d/c) x]))/(Sqrt[1-(d/c) x]))dx,x,Sin[e+f x]]

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_+d_.*sin[e_.+f_.*x_]),x_Symbol] :=
  c*Cos[e+f*x]/(f*Sqrt[1+Sin[e+f*x]]*Sqrt[1-Sin[e+f*x]])*Subst[Int[(a+b*x)^m*Sqrt[1+d/c*x]/Sqrt[1-d/c*x],x],x,Sin[e+f*x]] /;
FreeQ[{a,b,c,d,e,f,m},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && Not[IntegerQ[2*m]] && EqQ[c^2-d^2,0]

2:  ∫(((a+b Sin[e+f x]))^m)(c+d Sin[e+f x])dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ 2m∉ℤ ∧ (c^2)-(d^2)≠0

Derivation: Algebraic expansion

Basis: c+d z==((b c-a d)/b)+(d/b)(a+b z)

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0, then

∫(((a+b Sin[e+f x]))^m)(c+d Sin[e+f x])dx  ⟶  ((b c-a d)/b)∫(((a+b Sin[e+f x]))^m)dx+(d/b)∫(((a+b Sin[e+f x]))^(m+1))dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_.+d_.*sin[e_.+f_.*x_]),x_Symbol] :=
  (b*c-a*d)/b*Int[(a+b*Sin[e+f*x])^m,x] + d/b*Int[(a+b*Sin[e+f*x])^(m+1),x] /;
FreeQ[{a,b,c,d,e,f,m},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0]

7.  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0

1:  ∫(((a+b Sin[e+f x]))^m) (((d Sin[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ m∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

Rule: If  (a^2)-(b^2)==0 ∧ m∈(SuperPlus[ℤ]), then

∫(((a+b Sin[e+f x]))^m) (((d Sin[e+f x]))^n)dx  ⟶  ∫ExpandTrig[(((a+b Sin[e+f x]))^m) (((d Sin[e+f x]))^n),x]dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_.*(d_.*sin[e_.+f_.*x_])^n_.,x_Symbol] :=
  Int[ExpandTrig[(a+b*sin[e+f*x])^m*(d*sin[e+f*x])^n,x],x] /;
FreeQ[{a,b,d,e,f,n},x] && EqQ[a^2-b^2,0] && IGtQ[m,0] && RationalQ[n]

2.  ∫(((a+b Sin[e+f x]))^m)(((c+d Sin[e+f x]))^2)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0

1.  ∫((Sin[e+f x])^2)(((a+b Sin[e+f x]))^m)dx  when  (a^2)-(b^2)==0

1:  ∫((Sin[e+f x])^2)(((a+b Sin[e+f x]))^m)dx  when  (a^2)-(b^2)==0 ∧ m<-(1/2)

Derivation: ???

Rule: If  (a^2)-(b^2)==0 ∧ m<-(1/2), then

∫((Sin[e+f x])^2)(((a+b Sin[e+f x]))^m)dx  ⟶  
((b Cos[e+f x](((a+b Sin[e+f x]))^m))/(a f (2m+1)))-(1/((a^2)(2m+1)))∫(((a+b Sin[e+f x]))^(m+1))(a m-b(2m+1)Sin[e+f x])dx

Program code:

Int[sin[e_.+f_.*x_]^2*(a_+b_.*sin[e_.+f_.*x_])^m_,x_Symbol] :=
  b*Cos[e+f*x]*(a+b*Sin[e+f*x])^m/(a*f*(2*m+1)) - 
  1/(a^2*(2*m+1))*Int[(a+b*Sin[e+f*x])^(m+1)*(a*m-b*(2*m+1)*Sin[e+f*x]),x] /;
FreeQ[{a,b,e,f},x] && EqQ[a^2-b^2,0] && LtQ[m,-1/2]

2:  ∫((Sin[e+f x])^2)(((a+b Sin[e+f x]))^m)dx  when  (a^2)-(b^2)==0 ∧ m≮-(1/2)

Derivation: Nondegenerate sine recurrence 1b with A->(a^2),B->2 a b,C->(b^2),m->0,p->0

Rule: If  (a^2)-(b^2)==0 ∧ m≮-(1/2), then

∫((Sin[e+f x])^2)(((a+b Sin[e+f x]))^m)dx  ⟶  
-((Cos[e+f x](((a+b Sin[e+f x]))^(m+1)))/(b f (m+2)))+(1/(b (m+2)))∫(((a+b Sin[e+f x]))^m)(b (m+1)-a Sin[e+f x])dx

Program code:

Int[sin[e_.+f_.*x_]^2*(a_+b_.*sin[e_.+f_.*x_])^m_,x_Symbol] :=
  -Cos[e+f*x]*(a+b*Sin[e+f*x])^(m+1)/(b*f*(m+2)) + 
  1/(b*(m+2))*Int[(a+b*Sin[e+f*x])^m*(b*(m+1)-a*Sin[e+f*x]),x] /;
FreeQ[{a,b,e,f,m},x] && EqQ[a^2-b^2,0] && Not[LtQ[m,-1/2]]

2.  ∫(((a+b Sin[e+f x]))^m)(((c+d Sin[e+f x]))^2)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0

1:  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^2)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ m<-1

Derivation: Singly degenerate sine recurrence 2a with A->c,B->d,n->1,p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ m<-1, then

∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^2)dx  ⟶  
(((b c-a d) Cos[e+f x] (((a+b Sin[e+f x]))^m) (c+d Sin[e+f x]))/(a f (2 m+1)))+
(1/(a b (2 m+1)))∫(((a+b Sin[e+f x]))^(m+1))(a c d (m-1)+b ((d^2)+(c^2) (m+1))+d (a d (m-1)+b c (m+2)) Sin[e+f x])dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_+d_.*sin[e_.+f_.*x_])^2,x_Symbol] :=
  (b*c-a*d)*Cos[e+f*x]*(a+b*Sin[e+f*x])^m*(c+d*Sin[e+f*x])/(a*f*(2*m+1)) + 
  1/(a*b*(2*m+1))*Int[(a+b*Sin[e+f*x])^(m+1)*Simp[a*c*d*(m-1)+b*(d^2+c^2*(m+1))+d*(a*d*(m-1)+b*c*(m+2))*Sin[e+f*x],x],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && LtQ[m,-1]

2:  ∫(((a+b Sin[e+f x]))^m)(((c+d Sin[e+f x]))^2)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ m≮-1

Derivation: Nondegenerate sine recurrence 1b with A->(a^2),B->2 a b,C->(b^2),m->0,p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ m≮-1, then

∫(((a+b Sin[e+f x]))^m)(((c+d Sin[e+f x]))^2)dx  ⟶  
-(((d^2) Cos[e+f x](((a+b Sin[e+f x]))^(m+1)))/(b f (m+2)))+
(1/(b (m+2)))∫(((a+b Sin[e+f x]))^m)(b ((d^2) (m+1)+(c^2) (m+2))-d (a d-2 b c (m+2)) Sin[e+f x])dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_+d_.*sin[e_.+f_.*x_])^2,x_Symbol] :=
  -d^2*Cos[e+f*x]*(a+b*Sin[e+f*x])^(m+1)/(b*f*(m+2)) + 
  1/(b*(m+2))*Int[(a+b*Sin[e+f*x])^m*Simp[b*(d^2*(m+1)+c^2*(m+2))-d*(a*d-2*b*c*(m+2))*Sin[e+f*x],x],x] /;
FreeQ[{a,b,c,d,e,f,m},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && Not[LtQ[m,-1]]

3.  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ m>1

1:  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ m>1 ∧ n<-1

Derivation: Singly degenerate sine recurrence 1a with A->a,B->b,m->m-1,p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ m>1 ∧ n<-1, then

∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  ⟶  
-(((b^2) (b c-a d) Cos[e+f x] (((a+b Sin[e+f x]))^(m-2)) (((c+d Sin[e+f x]))^(n+1)))/(d f (n+1)(b c+a d)))+
((b^2)/(d (n+1)(b c+a d)))∫(((a+b Sin[e+f x]))^(m-2)) (((c+d Sin[e+f x]))^(n+1))(a c (m-2)-b d (m-2 n-4)-(b c (m-1)-a d (m+2 n+1)) Sin[e+f x])dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_.+d_.*sin[e_.+f_.*x_])^n_,x_Symbol] :=
  -b^2*(b*c-a*d)*Cos[e+f*x]*(a+b*Sin[e+f*x])^(m-2)*(c+d*Sin[e+f*x])^(n+1)/(d*f*(n+1)*(b*c+a*d)) + 
  b^2/(d*(n+1)*(b*c+a*d))*Int[(a+b*Sin[e+f*x])^(m-2)*(c+d*Sin[e+f*x])^(n+1)*
    Simp[a*c*(m-2)-b*d*(m-2*n-4)-(b*c*(m-1)-a*d*(m+2*n+1))*Sin[e+f*x],x],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && GtQ[m,1] && LtQ[n,-1] && 
  (IntegersQ[2*m,2*n] || IntegerQ[m+1/2] || IntegerQ[m] && EqQ[c,0])

2:  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ m>1 ∧ n≮-1

Derivation: Singly degenerate sine recurrence 1b with A->a,B->b,m->m-1,p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ m>1 ∧ n≮-1, then

∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  ⟶  
-(((b^2) Cos[e+f x] (((a+b Sin[e+f x]))^(m-2)) (((c+d Sin[e+f x]))^(n+1)))/(d f (m+n)))+
(1/(d (m+n)))∫(((a+b Sin[e+f x]))^(m-2)) (((c+d Sin[e+f x]))^n)·
(a b c (m-2)+(b^2) d (n+1)+(a^2) d (m+n)-b (b c (m-1)-a d (3 m+2 n-2)) Sin[e+f x])dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_.+d_.*sin[e_.+f_.*x_])^n_,x_Symbol] :=
  -b^2*Cos[e+f*x]*(a+b*Sin[e+f*x])^(m-2)*(c+d*Sin[e+f*x])^(n+1)/(d*f*(m+n)) + 
  1/(d*(m+n))*Int[(a+b*Sin[e+f*x])^(m-2)*(c+d*Sin[e+f*x])^n*
    Simp[a*b*c*(m-2)+b^2*d*(n+1)+a^2*d*(m+n)-b*(b*c*(m-1)-a*d*(3*m+2*n-2))*Sin[e+f*x],x],x] /;
FreeQ[{a,b,c,d,e,f,n},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && GtQ[m,1] && Not[LtQ[n,-1]] && 
  (IntegersQ[2*m,2*n] || IntegerQ[m+1/2] || IntegerQ[m] && EqQ[c,0])

4.  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ m<-1

1.  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ m<-1 ∧ n>0

1:  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ m<-1 ∧ 0<n<1

Derivation: Singly degenerate sine recurrence 2a with A->1,B->0,p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ m<-1 ∧ 0<n<1, then

∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  ⟶  
((b Cos[e+f x] (((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n))/(a f (2m+1)))-
(1/(a b (2m+1)))∫(((a+b Sin[e+f x]))^(m+1)) (((c+d Sin[e+f x]))^(n-1)) (a d n-b c (m+1)-b d (m+n+1) Sin[e+f x])dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_.+d_.*sin[e_.+f_.*x_])^n_,x_Symbol] :=
  b*Cos[e+f*x]*(a+b*Sin[e+f*x])^m*(c+d*Sin[e+f*x])^n/(a*f*(2*m+1)) - 
  1/(a*b*(2*m+1))*Int[(a+b*Sin[e+f*x])^(m+1)*(c+d*Sin[e+f*x])^(n-1)*Simp[a*d*n-b*c*(m+1)-b*d*(m+n+1)*Sin[e+f*x],x],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && LtQ[m,-1] && LtQ[0,n,1] && 
  (IntegersQ[2*m,2*n] || IntegerQ[m] && EqQ[c,0])

2:  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ m<-1 ∧ n>1

Derivation: Singly degenerate sine recurrence 2a with A->c,B->d,n->n-1,p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ m<-1 ∧ n>1, then

∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  ⟶  
(((b c-a d) Cos[e+f x] (((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^(n-1)))/(a f (2 m+1)))+
(1/(a b (2 m+1)))∫(((a+b Sin[e+f x]))^(m+1)) (((c+d Sin[e+f x]))^(n-2)) (b ((c^2) (m+1)+(d^2) (n-1))+a c d (m-n+1)+d (a d (m-n+1)+b c (m+n)) Sin[e+f x] )dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_.+d_.*sin[e_.+f_.*x_])^n_,x_Symbol] :=
  (b*c-a*d)*Cos[e+f*x]*(a+b*Sin[e+f*x])^m*(c+d*Sin[e+f*x])^(n-1)/(a*f*(2*m+1)) + 
  1/(a*b*(2*m+1))*Int[(a+b*Sin[e+f*x])^(m+1)*(c+d*Sin[e+f*x])^(n-2)*
    Simp[b*(c^2*(m+1)+d^2*(n-1))+a*c*d*(m-n+1)+d*(a*d*(m-n+1)+b*c*(m+n))*Sin[e+f*x],x],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && LtQ[m,-1] && GtQ[n,1] && 
  (IntegersQ[2*m,2*n] || IntegerQ[m] && EqQ[c,0])

2:  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ m<-1 ∧ n≯0

Derivation: Singly degenerate sine recurrence 2b with A->1,B->0,p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ m<-1 ∧ n≯0, then

∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  ⟶  
(((b^2) Cos[e+f x] (((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^(n+1)))/(a f (2 m+1)(b c-a d)))+
(1/(a (2 m+1)(b c-a d)))∫(((a+b Sin[e+f x]))^(m+1)) (((c+d Sin[e+f x]))^n) (b c (m+1)-a d (2 m+n+2)+b d (m+n+2) Sin[e+f x])dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_.+d_.*sin[e_.+f_.*x_])^n_,x_Symbol] :=
  b^2*Cos[e+f*x]*(a+b*Sin[e+f*x])^m*(c+d*Sin[e+f*x])^(n+1)/(a*f*(2*m+1)*(b*c-a*d)) + 
  1/(a*(2*m+1)*(b*c-a*d))*Int[(a+b*Sin[e+f*x])^(m+1)*(c+d*Sin[e+f*x])^n*
    Simp[b*c*(m+1)-a*d*(2*m+n+2)+b*d*(m+n+2)*Sin[e+f*x],x],x] /;
FreeQ[{a,b,c,d,e,f,n},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && LtQ[m,-1] && Not[GtQ[n,0]] && 
  (IntegersQ[2*m,2*n] || IntegerQ[m] && EqQ[c,0])

5.  ∫((((c+d Sin[e+f x]))^n)/(a+b Sin[e+f x]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0

1:  ∫((((c+d Sin[e+f x]))^n)/(a+b Sin[e+f x]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ n>1

Derivation: Singly degenerate sine recurrence 2a with A->c,B->d,m->-1,n->n-1,p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ n>1, then

∫((((c+d Sin[e+f x]))^n)/(a+b Sin[e+f x]))dx  ⟶  
-(((b c-a d) Cos[e+f x] (((c+d Sin[e+f x]))^(n-1)))/(a f(a+b Sin[e+f x])))-(d/(a b))∫(((c+d Sin[e+f x]))^(n-2)) (b d (n-1)-a c n+(b c (n-1)-a d n) Sin[e+f x] )dx

Program code:

Int[(c_.+d_.*sin[e_.+f_.*x_])^n_/(a_+b_.*sin[e_.+f_.*x_]),x_Symbol] :=
  -(b*c-a*d)*Cos[e+f*x]*(c+d*Sin[e+f*x])^(n-1)/(a*f*(a+b*Sin[e+f*x])) - 
  d/(a*b)*Int[(c+d*Sin[e+f*x])^(n-2)*Simp[b*d*(n-1)-a*c*n+(b*c*(n-1)-a*d*n)*Sin[e+f*x],x],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && GtQ[n,1] && (IntegerQ[2*n] || EqQ[c,0])

2:  ∫((((c+d Sin[e+f x]))^n)/(a+b Sin[e+f x]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ n<0

Derivation: Singly degenerate sine recurrence 2b with A->1,B->0,m->-1,p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ n<0, then

∫((((c+d Sin[e+f x]))^n)/(a+b Sin[e+f x]))dx  ⟶  
-(((b^2) Cos[e+f x](((c+d Sin[e+f x]))^(n+1)))/(a f(b c-a d)(a+b Sin[e+f x])))+(d/(a (b c-a d)))∫(((c+d Sin[e+f x]))^n) (a n-b (n+1) Sin[e+f x])dx

Program code:

Int[(c_.+d_.*sin[e_.+f_.*x_])^n_/(a_+b_.*sin[e_.+f_.*x_]),x_Symbol] :=
  -b^2*Cos[e+f*x]*(c+d*Sin[e+f*x])^(n+1)/(a*f*(b*c-a*d)*(a+b*Sin[e+f*x])) + 
  d/(a*(b*c-a*d))*Int[(c+d*Sin[e+f*x])^n*(a*n-b*(n+1)*Sin[e+f*x]),x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && LtQ[n,0] && (IntegerQ[2*n] || EqQ[c,0])

3:  ∫((((c+d Sin[e+f x]))^n)/(a+b Sin[e+f x]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0

Derivation: Singly degenerate sine recurrence 2a with A->1,B->0,m->-1,p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0, then

∫((((c+d Sin[e+f x]))^n)/(a+b Sin[e+f x]))dx  ⟶  
-((b Cos[e+f x] (((c+d Sin[e+f x]))^n))/(a f(a+b Sin[e+f x])))+((d n)/(a b))∫(((c+d Sin[e+f x]))^(n-1)) (a-b Sin[e+f x])dx

Program code:

Int[(c_.+d_.*sin[e_.+f_.*x_])^n_/(a_+b_.*sin[e_.+f_.*x_]),x_Symbol] :=
  -b*Cos[e+f*x]*(c+d*Sin[e+f*x])^n/(a*f*(a+b*Sin[e+f*x])) + 
  d*n/(a*b)*Int[(c+d*Sin[e+f*x])^(n-1)*(a-b*Sin[e+f*x]),x] /;
FreeQ[{a,b,c,d,e,f,n},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && (IntegerQ[2*n] || EqQ[c,0])

6.  ∫(Sqrt[a+b Sin[e+f x]]) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0

1.  ∫(Sqrt[a+b Sin[e+f x]]) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ 2n∈ℤ

1:  ∫(Sqrt[a+b Sin[e+f x]])(((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ n>0

Derivation: Singly degenerate sine recurrence 1b with A->c,B->d,m->(1/2),n->n-1,p->0 and algebraic simplification

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ n>0, then

∫(Sqrt[a+b Sin[e+f x]])(((c+d Sin[e+f x]))^n)dx ⟶  
-((2b Cos[e+f x] (((c+d Sin[e+f x]))^n))/(f (2n+1) (Sqrt[a+b Sin[e+f x]])))+((2 n(b c+a d))/(b (2n+1)))∫(Sqrt[a+b Sin[e+f x]])(((c+d Sin[e+f x]))^(n-1))dx

Program code:

Int[Sqrt[a_+b_.*sin[e_.+f_.*x_]]*(c_.+d_.*sin[e_.+f_.*x_])^n_,x_Symbol] :=
  -2*b*Cos[e+f*x]*(c+d*Sin[e+f*x])^n/(f*(2*n+1)*Sqrt[a+b*Sin[e+f*x]]) + 
  2*n*(b*c+a*d)/(b*(2*n+1))*Int[Sqrt[a+b*Sin[e+f*x]]*(c+d*Sin[e+f*x])^(n-1),x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && GtQ[n,0] && IntegerQ[2*n]

2.  ∫(Sqrt[a+b Sin[e+f x]]) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ n<-1

1:  ∫((Sqrt[a+b Sin[e+f x]])/(((c+d Sin[e+f x]))^(3/2)))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0

Derivation: Singly degenerate sine recurrence 1a with A->1,B->0,m->(1/2),n->-(3/2)p->0

Derivation: Singly degenerate sine recurrence 1c with A->a,B->b,m->-(1/2),n->-(3/2),p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0, then

∫((Sqrt[a+b Sin[e+f x]])/(((c+d Sin[e+f x]))^(3/2)))dx  ⟶  -((2 (b^2) Cos[e+f x])/(f(b c+a d)(Sqrt[a+b Sin[e+f x]]) (Sqrt[c+d Sin[e+f x]])))

Program code:

Int[Sqrt[a_+b_.*sin[e_.+f_.*x_]]/(c_.+d_.*sin[e_.+f_.*x_])^(3/2),x_Symbol] :=
  -2*b^2*Cos[e+f*x]/(f*(b*c+a*d)*Sqrt[a+b*Sin[e+f*x]]*Sqrt[c+d*Sin[e+f*x]]) /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && NeQ[c^2-d^2,0]

2:  ∫(Sqrt[a+b Sin[e+f x]]) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ n<-1

Derivation: Singly degenerate sine recurrence 1c with A->a,B->b,m->-(1/2),p->0 and algebraic simplification

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ n<-1, then

∫(Sqrt[a+b Sin[e+f x]]) (((c+d Sin[e+f x]))^n)dx  ⟶  
(((b c-a d) Cos[e+f x](((c+d Sin[e+f x]))^(n+1)))/(f (n+1)((c^2)-(d^2))(Sqrt[a+b Sin[e+f x]])))+(((2 n+3)(b c-a d))/(2b (n+1)((c^2)-(d^2))))∫(Sqrt[a+b Sin[e+f x]]) (((c+d Sin[e+f x]))^(n+1))dx

Program code:

Int[Sqrt[a_+b_.*sin[e_.+f_.*x_]]*(c_.+d_.*sin[e_.+f_.*x_])^n_,x_Symbol] :=
  (b*c-a*d)*Cos[e+f*x]*(c+d*Sin[e+f*x])^(n+1)/(f*(n+1)*(c^2-d^2)*Sqrt[a+b*Sin[e+f*x]]) + 
  (2*n+3)*(b*c-a*d)/(2*b*(n+1)*(c^2-d^2))*Int[Sqrt[a+b*Sin[e+f*x]]*(c+d*Sin[e+f*x])^(n+1),x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && LtQ[n,-1] && NeQ[2*n+3,0] && IntegerQ[2*n]

3:  ∫((Sqrt[a+b Sin[e+f x]])/(c+d Sin[e+f x]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0

Author: Martin Welz on 24 June 2011; generalized by Albert Rich 14 April 2014

Derivation: Integration by substitution

Basis: If  (a^2)-(b^2)==0, then ((Sqrt[a+b Sin[e+f x]])/(c+d Sin[e+f x]))==-((2 b)/f)Subst[(1/(b c+a d-d (x^2))),x,((b Cos[e+f x])/(Sqrt[a+b Sin[e+f x]]))] (∂_x)((b Cos[e+f x])/(Sqrt[a+b Sin[e+f x]]))

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0, then

∫((Sqrt[a+b Sin[e+f x]])/(c+d Sin[e+f x]))dx  ⟶  -((2 b)/f) Subst[∫(1/(b c+a d-d (x^2)))dx,x,((b Cos[e+f x])/(Sqrt[a+b Sin[e+f x]]))]

Program code:

Int[Sqrt[a_+b_.*sin[e_.+f_.*x_]]/(c_.+d_.*sin[e_.+f_.*x_]),x_Symbol] :=
  -2*b/f*Subst[Int[1/(b*c+a*d-d*x^2),x],x,b*Cos[e+f*x]/Sqrt[a+b*Sin[e+f*x]]] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && NeQ[c^2-d^2,0]

4.  ∫((Sqrt[a+b Sin[e+f x]])/(Sqrt[c+d Sin[e+f x]]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0

1:  ∫((Sqrt[a+b Sin[e+f x]])/(Sqrt[d Sin[e+f x]]))dx  when  (a^2)-(b^2)==0 ∧ d==(a/b)

Author: Martin Welz on 24 June 2011

Derivation: Integration by substitution

Basis: If  (a^2)-(b^2)==0 ∧ d==(a/b), then ((Sqrt[a+b Sin[e+f x]])/(Sqrt[d Sin[e+f x]]))==-(2/f) Subst[(1/(Sqrt[1-((x^2)/a)])),x,((b Cos[e+f x])/(Sqrt[a+b Sin[e+f x]]))] (∂_x)((b Cos[e+f x])/(Sqrt[a+b Sin[e+f x]]))

Rule: If  (a^2)-(b^2)==0 ∧ d==(a/b), then

∫((Sqrt[a+b Sin[e+f x]])/(Sqrt[d Sin[e+f x]]))dx  ⟶  -(2/f) Subst[∫(1/(Sqrt[1-((x^2)/a)]))dx ,x,((b Cos[e+f x])/(Sqrt[a+b Sin[e+f x]]))]

Program code:

Int[Sqrt[a_+b_.*sin[e_.+f_.*x_]]/Sqrt[d_.*sin[e_.+f_.*x_]],x_Symbol] :=
  -2/f*Subst[Int[1/Sqrt[1-x^2/a],x],x,b*Cos[e+f*x]/Sqrt[a+b*Sin[e+f*x]]] /;
FreeQ[{a,b,d,e,f},x] && EqQ[a^2-b^2,0] && EqQ[d,a/b]

2:  ∫((Sqrt[a+b Sin[e+f x]])/(Sqrt[c+d Sin[e+f x]]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0

Author: Martin Welz on 10 March 2011

Derivation: Integration by substitution

Basis: If  (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0, then ((Sqrt[a+b Sin[e+f x]])/(Sqrt[c+d Sin[e+f x]]))==-((2b)/f) Subst[(1/(b+d (x^2))),x,((b Cos[e+f x])/((Sqrt[a+b Sin[e+f x]]) (Sqrt[c+d Sin[e+f x]])))] (∂_x)((b Cos[e+f x])/((Sqrt[a+b Sin[e+f x]]) (Sqrt[c+d Sin[e+f x]])))

Note: The above identity is not valid if  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)==0, since the derivative vanishes!

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0, then

∫((Sqrt[a+b Sin[e+f x]])/(Sqrt[c+d Sin[e+f x]]))dx  ⟶  -((2b)/f) Subst[∫(1/(b+d (x^2)))dx ,x,((b Cos[e+f x])/((Sqrt[a+b Sin[e+f x]]) (Sqrt[c+d Sin[e+f x]])))]

Program code:

Int[Sqrt[a_+b_.*sin[e_.+f_.*x_]]/Sqrt[c_.+d_.*sin[e_.+f_.*x_]],x_Symbol] :=
  -2*b/f*Subst[Int[1/(b+d*x^2),x],x,b*Cos[e+f*x]/(Sqrt[a+b*Sin[e+f*x]]*Sqrt[c+d*Sin[e+f*x]])] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && NeQ[c^2-d^2,0]

2:  ∫(Sqrt[a+b Sin[e+f x]]) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ 2n∉ℤ

Derivation: Piecewise constant extraction and integration by substitution

Basis: If  (a^2)-(b^2)==0, then (∂_x)((Cos[e+f x])/((Sqrt[a-b Sin[e+f x]]) (Sqrt[a+b Sin[e+f x]])))==0

Basis: Cos[e+f x]==(1/f)(∂_x)Sin[e+f x]

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ 2n∉ℤ, then

∫(Sqrt[a+b Sin[e+f x]]) (((c+d Sin[e+f x]))^n)dx  ⟶  

(((a^2) Cos[e+f x])/((Sqrt[a+b Sin[e+f x]]) (Sqrt[a-b Sin[e+f x]])))∫((Cos[e+f x] (((c+d Sin[e+f x]))^n))/(Sqrt[a-b Sin[e+f x]]))dx  ⟶  

(((a^2) Cos[e+f x])/(f (Sqrt[a+b Sin[e+f x]]) (Sqrt[a-b Sin[e+f x]])))Subst[∫((((c+d x))^n)/(Sqrt[a-b x]))dx,x,Sin[e+f x]]

Program code:

Int[Sqrt[a_+b_.*sin[e_.+f_.*x_]]*(c_.+d_.*sin[e_.+f_.*x_])^n_,x_Symbol] :=
  a^2*Cos[e+f*x]/(f*Sqrt[a+b*Sin[e+f*x]]*Sqrt[a-b*Sin[e+f*x]])*Subst[Int[(c+d*x)^n/Sqrt[a-b*x],x],x,Sin[e+f*x]] /;
FreeQ[{a,b,c,d,e,f,n},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && Not[IntegerQ[2*n]]

7.  ∫((((c+d Sin[e+f x]))^n)/(Sqrt[a+b Sin[e+f x]]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0

1.  ∫((((c+d Sin[e+f x]))^n)/(Sqrt[a+b Sin[e+f x]]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ n>0

1:  ∫((Sqrt[c+d Sin[e+f x]])/(Sqrt[a+b Sin[e+f x]]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0

Derivation: Algebraic expansion

Basis:  ((Sqrt[c+d z])/(Sqrt[a+b z]))==((b c-a d)/(b (Sqrt[a+b z]) (Sqrt[c+d z])))+((d (Sqrt[a+b z]))/(b (Sqrt[c+d z])))

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0, then

∫((Sqrt[c+d Sin[e+f x]])/(Sqrt[a+b Sin[e+f x]]))dx  ⟶  (d/b)∫((Sqrt[a+b Sin[e+f x]])/(Sqrt[c+d Sin[e+f x]]))dx+((b c-a d)/b)∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[c+d Sin[e+f x]])))dx

Program code:

Int[Sqrt[c_.+d_.*sin[e_.+f_.*x_]]/Sqrt[a_+b_.*sin[e_.+f_.*x_]],x_Symbol] :=
  d/b*Int[Sqrt[a+b*Sin[e+f*x]]/Sqrt[c+d*Sin[e+f*x]],x] + 
  (b*c-a*d)/b*Int[1/(Sqrt[a+b*Sin[e+f*x]]*Sqrt[c+d*Sin[e+f*x]]),x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && NeQ[c^2-d^2,0]

2:  ∫((((c+d Sin[e+f x]))^n)/(Sqrt[a+b Sin[e+f x]]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ n>1

Derivation: Singly degenerate sine recurrence 2c with A->c,B->d,m->(1/2),n->n-1,p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ n>1, then

∫((((c+d Sin[e+f x]))^n)/(Sqrt[a+b Sin[e+f x]]))dx  ⟶  
-((2d Cos[e+f x] (((c+d Sin[e+f x]))^(n-1)))/(f (2n-1)(Sqrt[a+b Sin[e+f x]])))-(1/(b (2n-1)))∫(((((c+d Sin[e+f x]))^(n-2)) (a c d-b (2 (d^2) (n-1)+(c^2) (2 n-1))+d (a d-b c (4 n-3)) Sin[e+f x]))/(Sqrt[a+b Sin[e+f x]])) dx

Program code:

Int[(c_.+d_.*sin[e_.+f_.*x_])^n_/Sqrt[a_+b_.*sin[e_.+f_.*x_]],x_Symbol] :=
  -2*d*Cos[e+f*x]*(c+d*Sin[e+f*x])^(n-1)/(f*(2*n-1)*Sqrt[a+b*Sin[e+f*x]]) - 
  1/(b*(2*n-1))*Int[(c+d*Sin[e+f*x])^(n-2)/Sqrt[a+b*Sin[e+f*x]]*
    Simp[a*c*d-b*(2*d^2*(n-1)+c^2*(2*n-1))+d*(a*d-b*c*(4*n-3))*Sin[e+f*x],x],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && GtQ[n,1] && IntegerQ[2*n]

2:  ∫((((c+d Sin[e+f x]))^n)/(Sqrt[a+b Sin[e+f x]]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ n<-1

Derivation: Singly degenerate sine recurrence 1c with A->1,B->0,p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ n<-1, then

∫((((c+d Sin[e+f x]))^n)/(Sqrt[a+b Sin[e+f x]]))dx  ⟶  
-((d Cos[e+f x] (((c+d Sin[e+f x]))^(n+1)))/(f (n+1)((c^2)-(d^2))(Sqrt[a+b Sin[e+f x]])))-(1/(2b (n+1)((c^2)-(d^2))))∫(((((c+d Sin[e+f x]))^(n+1)) (a d-2 b c (n+1)+b d (2 n+3) Sin[e+f x]))/(Sqrt[a+b Sin[e+f x]])) dx

Program code:

Int[(c_.+d_.*sin[e_.+f_.*x_])^n_/Sqrt[a_+b_.*sin[e_.+f_.*x_]],x_Symbol] :=
  -d*Cos[e+f*x]*(c+d*Sin[e+f*x])^(n+1)/(f*(n+1)*(c^2-d^2)*Sqrt[a+b*Sin[e+f*x]]) - 
  1/(2*b*(n+1)*(c^2-d^2))*Int[(c+d*Sin[e+f*x])^(n+1)*Simp[a*d-2*b*c*(n+1)+b*d*(2*n+3)*Sin[e+f*x],x]/Sqrt[a+b*Sin[e+f*x]],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && LtQ[n,-1] && IntegerQ[2*n]

3:  ∫(1/((Sqrt[a+b Sin[e+f x]])(c+d Sin[e+f x])))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0

Derivation: Algebraic expansion

Basis: (1/((Sqrt[a+b z]) (c+d z)))==(b/((b c-a d) (Sqrt[a+b z])))-((d (Sqrt[a+b z]))/((b c-a d) (c+d z)))

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0, then

∫(1/((Sqrt[a+b Sin[e+f x]])(c+d Sin[e+f x])))dx  ⟶  (b/(b c-a d))∫(1/(Sqrt[a+b Sin[e+f x]]))dx-(d/(b c-a d))∫((Sqrt[a+b Sin[e+f x]])/(c+d Sin[e+f x]))dx

Program code:

Int[1/(Sqrt[a_+b_.*sin[e_.+f_.*x_]]*(c_.+d_.*sin[e_.+f_.*x_])),x_Symbol] :=
  b/(b*c-a*d)*Int[1/Sqrt[a+b*Sin[e+f*x]],x] - d/(b*c-a*d)*Int[Sqrt[a+b*Sin[e+f*x]]/(c+d*Sin[e+f*x]),x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && NeQ[c^2-d^2,0]

4.  ∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[c+d Sin[e+f x]])))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0

1:  ∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[d Sin[e+f x]])))dx  when  (a^2)-(b^2)==0 ∧ d==(a/b) ∧ a>0

Author: Martin Welz on 24 June 2011

Derivation: Integration by substitution

Basis: If  (a^2)-(b^2)==0 ∧ d==(a/b) ∧ a>0, then (1/((Sqrt[a+b Sin[e+f x]])(Sqrt[d Sin[e+f x]])))==-((Sqrt[2])/((Sqrt[a]) f)) Subst[(1/(Sqrt[1-(x^2)])),x,((b Cos[e+f x])/(a+b Sin[e+f x]))] (∂_x)((b Cos[e+f x])/(a+b Sin[e+f x]))

Basis: (EllipticF[z, 0])==z

Note: This is a special case of the rule for (a^2)≠(b^2).

Rule: If  (a^2)-(b^2)==0 ∧ d==(a/b) ∧ a>0, then

∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[d Sin[e+f x]])))dx  ⟶  -((Sqrt[2])/((Sqrt[a]) f))Subst[∫(1/(Sqrt[1-(x^2)]))dx,x,((b Cos[e+f x])/(a+b Sin[e+f x]))]

Program code:

Int[1/(Sqrt[a_+b_.*sin[e_.+f_.*x_]]*Sqrt[d_.*sin[e_.+f_.*x_]]),x_Symbol] :=
  -Sqrt[2]/(Sqrt[a]*f)*Subst[Int[1/Sqrt[1-x^2],x],x,b*Cos[e+f*x]/(a+b*Sin[e+f*x])] /;
FreeQ[{a,b,d,e,f},x] && EqQ[a^2-b^2,0] && EqQ[d,a/b] && GtQ[a,0]

2:  ∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[c+d Sin[e+f x]])))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0

Author: Martin Welz on 10 March 2011

Derivation: Integration by substitution

Basis: If  (a^2)-(b^2)==0, then (1/((Sqrt[a+b Sin[e+f x]])(Sqrt[c+d Sin[e+f x]])))==-((2a)/f) Subst[(1/(2(b^2)-(a c-b d) (x^2))),x,((b Cos[e+f x])/((Sqrt[a+b Sin[e+f x]])(Sqrt[c+d Sin[e+f x]])))] (∂_x)((b Cos[e+f x])/((Sqrt[a+b Sin[e+f x]])(Sqrt[c+d Sin[e+f x]])))

Note: The above identity is not valid if  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)==0, since the derivative vanishes!

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0, then

∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[c+d Sin[e+f x]])))dx  ⟶  -((2 a)/f) Subst[∫(1/(2(b^2)-(a c-b d) (x^2)))dx,x,((b Cos[e+f x])/((Sqrt[a+b Sin[e+f x]])(Sqrt[c+d Sin[e+f x]])))]

Program code:

Int[1/(Sqrt[a_+b_.*sin[e_.+f_.*x_]]*Sqrt[c_.+d_.*sin[e_.+f_.*x_]]),x_Symbol] :=
  -2*a/f*Subst[Int[1/(2*b^2-(a*c-b*d)*x^2),x],x,b*Cos[e+f*x]/(Sqrt[a+b*Sin[e+f*x]]*Sqrt[c+d*Sin[e+f*x]])] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && NeQ[c^2-d^2,0]

8:  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ n>1

Derivation: Singly degenerate sine recurrence 2c with A->c,B->d,n->n-1,p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ n>1, then

∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  ⟶  
-((d Cos[e+f x] (((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^(n-1)))/(f (m+n)))+
(1/(b (m+n)))∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^(n-2)) (d (a c m+b d (n-1))+b (c^2) (m+n)+(d (a d m+b c (m+2 n-1))) Sin[e+f x])dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_.+d_.*sin[e_.+f_.*x_])^n_,x_Symbol] :=
  -d*Cos[e+f*x]*(a+b*Sin[e+f*x])^m*(c+d*Sin[e+f*x])^(n-1)/(f*(m+n)) + 
  1/(b*(m+n))*Int[(a+b*Sin[e+f*x])^m*(c+d*Sin[e+f*x])^(n-2)*
    Simp[d*(a*c*m+b*d*(n-1))+b*c^2*(m+n)+d*(a*d*m+b*c*(m+2*n-1))*Sin[e+f*x],x],x] /;
FreeQ[{a,b,c,d,e,f,m},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && GtQ[n,1] && IntegerQ[n]

9.  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0

1:  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ m∈ℤ

Derivation: Piecewise constant extraction and integration by substitution

Basis: (∂_x)((Cos[e+f x])/((Sqrt[1+Sin[e+f x]]) (Sqrt[1-Sin[e+f x]])))==0

Basis: Cos[e+f x]==(1/f)(∂_x)Sin[e+f x]

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ m∈ℤ, then

∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  ⟶  

(((a^m) Cos[e+f x])/((Sqrt[1+Sin[e+f x]]) (Sqrt[1-Sin[e+f x]])))∫((Cos[e+f x] (((1+(b/a) Sin[e+f x]))^(m-(1/2))) (((c+d Sin[e+f x]))^n))/(Sqrt[1-(b/a) Sin[e+f x]]))dx  ⟶  

(((a^m) Cos[e+f x])/(f (Sqrt[1+Sin[e+f x]]) (Sqrt[1-Sin[e+f x]])))Subst[∫(((((1+(b/a) x))^(m-(1/2))) (((c+d x))^n))/(Sqrt[1-(b/a) x]))dx,x,Sin[e+f x]]

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_.+d_.*sin[e_.+f_.*x_])^n_.,x_Symbol] :=
  a^m*Cos[e+f*x]/(f*Sqrt[1+Sin[e+f*x]]*Sqrt[1-Sin[e+f*x]])*Subst[Int[(1+b/a*x)^(m-1/2)*(c+d*x)^n/Sqrt[1-b/a*x],x],x,Sin[e+f*x]] /;
FreeQ[{a,b,c,d,e,f,n},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && IntegerQ[m]

2.  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ m∉ℤ

1.  ∫(((a+b Sin[e+f x]))^m) (((d Sin[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ m∉ℤ

1.  ∫(((a+b Sin[e+f x]))^m) (((d Sin[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ m∉ℤ ∧ a>0

1:  ∫(((a+b Sin[e+f x]))^m) (((d Sin[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ m∉ℤ ∧ a>0 ∧ (d/b)>0

Derivation: Piecewise constant extraction and integration by substitution

Basis: If  (a^2)-(b^2)==0, then (∂_x)((Cos[e+f x])/((Sqrt[a+b Sin[e+f x]])(Sqrt[a-b Sin[e+f x]])))==0

Basis: If  (a^2)-(b^2)==0, then (((b^2) Cos[e+f x])/((Sqrt[a+b Sin[e+f x]])(Sqrt[a-b Sin[e+f x]])))((Cos[e+f x])/((Sqrt[a+b Sin[e+f x]])(Sqrt[a-b Sin[e+f x]])))==1

Basis: (( Cos[e+f x] (((a+b Sin[e+f x]))^(m-(1/2))) (((b Sin[e+f x]))^n))/(Sqrt[a-b Sin[e+f x]]))==-(1/(b f)) Subst[(((((a-x))^n) (((2a-x))^(m-(1/2))))/(Sqrt[x])),x,a-b Sin[e+f x]](∂_x)(a-b Sin[e+f x])

Note: If  a>0, then (((((a-x))^n) (((2a-x))^(m-(1/2))))/(Sqrt[x])) is integrable in terms of the Appell function without the need for additional piecewise constant extraction.

Rule: If  (a^2)-(b^2)==0 ∧ m∉ℤ ∧ a>0 ∧ (d/b)>0, then

∫(((a+b Sin[e+f x]))^m) (((d Sin[e+f x]))^n)dx  ⟶  

(((b^2) ((((d/b)))^n) Cos[e+f x])/((Sqrt[a+b Sin[e+f x]])(Sqrt[a-b Sin[e+f x]])))∫(( Cos[e+f x] (((a+b Sin[e+f x]))^(m-(1/2))) (((b Sin[e+f x]))^n))/(Sqrt[a-b Sin[e+f x]]))dx  ⟶  

-(( b ((((d/b)))^n) Cos[e+f x])/(f (Sqrt[a+b Sin[e+f x]])(Sqrt[a-b Sin[e+f x]])))Subst[∫(((((a-x))^n) (((2a-x))^(m-(1/2))))/(Sqrt[x]))dx,x,a-b Sin[e+f x]]

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(d_.*sin[e_.+f_.*x_])^n_,x_Symbol] :=
  -b*(d/b)^n*Cos[e+f*x]/(f*Sqrt[a+b*Sin[e+f*x]]*Sqrt[a-b*Sin[e+f*x]])*
    Subst[Int[(a-x)^n*(2*a-x)^(m-1/2)/Sqrt[x],x],x,a-b*Sin[e+f*x]] /;
FreeQ[{a,b,d,e,f,m,n},x] && EqQ[a^2-b^2,0] && Not[IntegerQ[m]] && GtQ[a,0] && GtQ[d/b,0]

2:  ∫(((a+b Sin[e+f x]))^m) (((d Sin[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ m∉ℤ ∧ a>0 ∧ (d/b)≯0

Derivation: Piecewise constant extraction

Basis: (∂_x)((((d Sin[e+f x]))^n)/(((b Sin[e+f x]))^n))==0

Rule: If  (a^2)-(b^2)==0 ∧ m∉ℤ ∧ a>0 ∧ (d/b)≯0, then

∫(((a+b Sin[e+f x]))^m) (((d Sin[e+f x]))^n)dx  ⟶  ((((((d/b)))^(IntPart[n])) (((d Sin[e+f x]))^(FracPart[n])))/(((b Sin[e+f x]))^(FracPart[n])))∫(((a+b Sin[e+f x]))^m) (((b Sin[e+f x]))^n)dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(d_.*sin[e_.+f_.*x_])^n_.,x_Symbol] :=
  (d/b)^IntPart[n]*(d*Sin[e+f*x])^FracPart[n]/(b*Sin[e+f*x])^FracPart[n]*Int[(a+b*Sin[e+f*x])^m*(b*Sin[e+f*x])^n,x] /;
FreeQ[{a,b,d,e,f,m,n},x] && EqQ[a^2-b^2,0] && Not[IntegerQ[m]] && GtQ[a,0] && Not[GtQ[d/b,0]]

2:  ∫(((a+b Sin[e+f x]))^m) (((d Sin[e+f x]))^n)dx  when  (a^2)-(b^2)==0 ∧ m∉ℤ ∧ a≯0

Derivation: Piecewise constant extraction

Basis: (∂_x)((((a+b Sin[e+f x]))^m)/(((1+(b/a) Sin[e+f x]))^m))==0

Rule: If  (a^2)-(b^2)==0 ∧ m∉ℤ ∧ a≯0, then

∫(((a+b Sin[e+f x]))^m) (((d Sin[e+f x]))^n)dx  ⟶  (((a^(IntPart[m])) (((a+b Sin[e+f x]))^(FracPart[m])))/(((1+(b/a) Sin[e+f x]))^(FracPart[m])))∫(((1+(b/a) Sin[e+f x]))^m) (((d Sin[e+f x]))^n)dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(d_.*sin[e_.+f_.*x_])^n_.,x_Symbol] :=
  a^IntPart[m]*(a+b*Sin[e+f*x])^FracPart[m]/(1+b/a*Sin[e+f*x])^FracPart[m]*
    Int[(1+b/a*Sin[e+f*x])^m*(d*Sin[e+f*x])^n,x] /;
FreeQ[{a,b,d,e,f,m,n},x] && EqQ[a^2-b^2,0] && Not[IntegerQ[m]] && Not[GtQ[a,0]]

2:  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ m∉ℤ

Derivation: Piecewise constant extraction and integration by substitution

Basis: If  (a^2)-(b^2)==0, then (∂_x)((Cos[e+f x])/((Sqrt[a+b Sin[e+f x]]) (Sqrt[a-b Sin[e+f x]])))==0

Basis: If  (a^2)-(b^2)==0, then (((a^2) Cos[e+f x])/((Sqrt[a+b Sin[e+f x]])(Sqrt[a-b Sin[e+f x]])))((Cos[e+f x])/((Sqrt[a+b Sin[e+f x]])(Sqrt[a-b Sin[e+f x]])))==1

Basis: Cos[e+f x]==(1/f)(∂_x)Sin[e+f x]

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ m∉ℤ, then

∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  ⟶  

(((a^2) Cos[e+f x])/((Sqrt[a+b Sin[e+f x]]) (Sqrt[a-b Sin[e+f x]])))∫((Cos[e+f x] (((a+b Sin[e+f x]))^(m-(1/2))) (((c+d Sin[e+f x]))^n))/(Sqrt[a-b Sin[e+f x]]))dx  ⟶  

(((a^2) Cos[e+f x])/(f (Sqrt[a+b Sin[e+f x]]) (Sqrt[a-b Sin[e+f x]])))Subst[∫(((((a+b x))^(m-(1/2))) (((c+d x))^n))/(Sqrt[a-b x]))dx,x,Sin[e+f x]]

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_+d_.*sin[e_.+f_.*x_])^n_.,x_Symbol] :=
  a^2*Cos[e+f*x]/(f*Sqrt[a+b*Sin[e+f*x]]*Sqrt[a-b*Sin[e+f*x]])*Subst[Int[(a+b*x)^(m-1/2)*(c+d*x)^n/Sqrt[a-b*x],x],x,Sin[e+f*x]] /;
FreeQ[{a,b,c,d,e,f,m,n},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && Not[IntegerQ[m]]

8.  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0

1.  ∫(((a+b Sin[e+f x]))^m)(((c+d Sin[e+f x]))^2)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0

1:  ∫(((b Sin[e+f x]))^m)(((c+d Sin[e+f x]))^2)dx

Derivation: Algebraic expansion

Basis: (((c+d z))^2)==((2c d)/b)(b z)+((c^2)+(d^2) (z^2))

Rule:

∫(((b Sin[e+f x]))^m)(((c+d Sin[e+f x]))^2)dx  ⟶  
((2c d)/b)∫(((b Sin[e+f x]))^(m+1))dx+∫(((b Sin[e+f x]))^m)((c^2)+(d^2) ((Sin[e+f x])^2))dx

Program code:

Int[(b_.*sin[e_.+f_.*x_])^m_*(c_+d_.*sin[e_.+f_.*x_])^2,x_Symbol] :=
  2*c*d/b*Int[(b*Sin[e+f*x])^(m+1),x] + Int[(b*Sin[e+f*x])^m*(c^2+d^2*Sin[e+f*x]^2),x] /;
FreeQ[{b,c,d,e,f,m},x]

2:  ∫(((a+b Sin[e+f x]))^m)(((c+d Sin[e+f x]))^2)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ m<-1

Derivation: Nondegenerate sine recurrence 1a with A->(c^2),B->2 c d,C->(d^2),n->0,p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ m<-1, then

∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^2)dx  ⟶  
-((((b^2) (c^2)-2 a b c d+(a^2) (d^2)) Cos[e+f x] (((a+b Sin[e+f x]))^(m+1)))/(b f (m+1)((a^2)-(b^2))))-
(1/(b (m+1)((a^2)-(b^2))))∫(((a+b Sin[e+f x]))^(m+1)) (b (m+1)(2 b c d-a ((c^2)+(d^2)))+((a^2) (d^2)-2 a b c d (m+2)+(b^2) ((d^2) (m+1)+(c^2) (m+2))) Sin[e+f x])dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_.+d_.*sin[e_.+f_.*x_])^2,x_Symbol] :=
  -(b^2*c^2-2*a*b*c*d+a^2*d^2)*Cos[e+f*x]*(a+b*Sin[e+f*x])^(m+1)/(b*f*(m+1)*(a^2-b^2)) - 
  1/(b*(m+1)*(a^2-b^2))*Int[(a+b*Sin[e+f*x])^(m+1)*
    Simp[b*(m+1)*(2*b*c*d-a*(c^2+d^2))+(a^2*d^2-2*a*b*c*d*(m+2)+b^2*(d^2*(m+1)+c^2*(m+2)))*Sin[e+f*x],x],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && LtQ[m,-1]

3:  ∫(((a+b Sin[e+f x]))^m)(((c+d Sin[e+f x]))^2)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ m≮-1

Derivation: Nondegenerate sine recurrence 1b with A->(a^2),B->2 a b,C->(b^2),m->0,p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ m≮-1, then

∫(((a+b Sin[e+f x]))^m)(((c+d Sin[e+f x]))^2)dx  ⟶  
-(((d^2) Cos[e+f x](((a+b Sin[e+f x]))^(m+1)))/(b f (m+2)))+
(1/(b (m+2)))∫(((a+b Sin[e+f x]))^m)(b ((d^2) (m+1)+(c^2) (m+2))-d (a d-2 b c (m+2)) Sin[e+f x])dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_.+d_.*sin[e_.+f_.*x_])^2,x_Symbol] :=
  -d^2*Cos[e+f*x]*(a+b*Sin[e+f*x])^(m+1)/(b*f*(m+2)) + 
  1/(b*(m+2))*Int[(a+b*Sin[e+f*x])^m*Simp[b*(d^2*(m+1)+c^2*(m+2))-d*(a*d-2*b*c*(m+2))*Sin[e+f*x],x],x] /;
FreeQ[{a,b,c,d,e,f,m},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && Not[LtQ[m,-1]]

x:  ∫(((a+b Sin[e+f x]))^m) (((d Sin[e+f x]))^n)dx  when  (a^2)-(b^2)≠0 ∧ m∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

Note: If terms having the same powers of Sin[e+f x] are collected, this rule results in more compact antiderivatives; however, the number of steps required grows exponentially with m.

Rule: If  (a^2)-(b^2)≠0 ∧ m∈(SuperPlus[ℤ]), then

∫(((a+b Sin[e+f x]))^m) (((d Sin[e+f x]))^n)dx  ⟶  ∫ExpandTrig[(((a+b Sin[e+f x]))^m) (((d Sin[e+f x]))^n),x]dx

Program code:

(* Int[(a_+b_.*sin[e_.+f_.*x_])^m_.*(d_.*sin[e_.+f_.*x_])^n_.,x_Symbol] :=
  Int[ExpandTrig[(a+b*sin[e+f*x])^m*(d*sin[e+f*x])^n,x],x] /;
FreeQ[{a,b,d,e,f,n},x] && NeQ[a^2-b^2,0] && IGtQ[m,0] *)

2.  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ m>2

1:  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ m>2 ∧ n<-1

Derivation: Nondegenerate sine recurrence 1a with A->(c^2),B->2 c d,C->(d^2),n->n-2,p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ m>2 ∧ n<-1, then

∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  ⟶  
-((((b^2) (c^2)-2 a b c d+(a^2) (d^2)) Cos[e+f x] (((a+b Sin[e+f x]))^(m-2)) (((c+d Sin[e+f x]))^(n+1)))/(d  f (n+1)((c^2)-(d^2))))+
(1/(d (n+1)((c^2)-(d^2))))∫(((a+b Sin[e+f x]))^(m-3)) (((c+d Sin[e+f x]))^(n+1))·
(b (m-2)(((b c-a d))^2)+a d (n+1)(c((a^2)+(b^2))-2 a b d)+
(b (n+1)(a b (c^2)+c d((a^2)+(b^2))-3 a b (d^2))-a (n+2)(((b c-a d))^2)) Sin[e+f x]+
b ((b^2) ((c^2)-(d^2))-m(((b c-a d))^2)+d n(2 a b c-d((a^2)+(b^2)))) ((Sin[e+f x])^2))dx

Program code:

Int[(a_.+b_.*sin[e_.+f_.*x_])^m_*(c_.+d_.*sin[e_.+f_.*x_])^n_,x_Symbol] :=
  -(b^2*c^2-2*a*b*c*d+a^2*d^2)*Cos[e+f*x]*(a+b*Sin[e+f*x])^(m-2)*(c+d*Sin[e+f*x])^(n+1)/(d*f*(n+1)*(c^2-d^2)) + 
  1/(d*(n+1)*(c^2-d^2))*Int[(a+b*Sin[e+f*x])^(m-3)*(c+d*Sin[e+f*x])^(n+1)*
    Simp[b*(m-2)*(b*c-a*d)^2+a*d*(n+1)*(c*(a^2+b^2)-2*a*b*d)+
      (b*(n+1)*(a*b*c^2+c*d*(a^2+b^2)-3*a*b*d^2)-a*(n+2)*(b*c-a*d)^2)*Sin[e+f*x]+
      b*(b^2*(c^2-d^2)-m*(b*c-a*d)^2+d*n*(2*a*b*c-d*(a^2+b^2)))*Sin[e+f*x]^2,x],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && GtQ[m,2] && LtQ[n,-1] && (IntegerQ[m] || IntegersQ[2*m,2*n])

2:  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ m>2 ∧ n≮-1

Derivation: Nondegenerate sine recurrence 1b with A->(a^2),B->2 a b,C->(b^2),m->m-2,p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ m>2 ∧ n≮-1, then

∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  ⟶  
-(((b^2) Cos[e+f x] (((a+b Sin[e+f x]))^(m-2)) (((c+d Sin[e+f x]))^(n+1)))/(d f (m+n)))+
(1/(d (m+n)))∫(((a+b Sin[e+f x]))^(m-3)) (((c+d Sin[e+f x]))^n)·
((a^3) d (m+n)+(b^2) (b c (m-2)+a d (n+1))-b (a b c-(b^2) d (m+n-1)-3 (a^2) d (m+n)) Sin[e+f x]-(b^2) (b c (m-1)-a d (3 m+2 n-2)) ((Sin[e+f x])^2))dx

Program code:

Int[(a_.+b_.*sin[e_.+f_.*x_])^m_*(c_.+d_.*sin[e_.+f_.*x_])^n_,x_Symbol] :=
  -b^2*Cos[e+f*x]*(a+b*Sin[e+f*x])^(m-2)*(c+d*Sin[e+f*x])^(n+1)/(d*f*(m+n)) + 
  1/(d*(m+n))*Int[(a+b*Sin[e+f*x])^(m-3)*(c+d*Sin[e+f*x])^n*
    Simp[a^3*d*(m+n)+b^2*(b*c*(m-2)+a*d*(n+1))-
      b*(a*b*c-b^2*d*(m+n-1)-3*a^2*d*(m+n))*Sin[e+f*x]-
      b^2*(b*c*(m-1)-a*d*(3*m+2*n-2))*Sin[e+f*x]^2,x],x] /;
FreeQ[{a,b,c,d,e,f,n},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && GtQ[m,2] && 
  (IntegerQ[m] || IntegersQ[2*m,2*n]) && Not[IGtQ[n,2] && (Not[IntegerQ[m]] || EqQ[a,0] && NeQ[c,0])]

3.  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ m<-1

1.  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ m<-1 ∧ 0<n<2

1.  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ m<-1 ∧ 0<n<1

1.  ∫((Sqrt[c+d Sin[e+f x]])/(((a+b Sin[e+f x]))^(3/2)))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0

1:  ∫((Sqrt[d Sin[e+f x]])/(((a+b Sin[e+f x]))^(3/2)))dx  when  (a^2)-(b^2)≠0

Derivation: Nondegenerate sine recurrence 1a with A->0,B->d,C->0,m->-(3/2),n->-(1/2),p->0

Rule: If  (a^2)-(b^2)≠0, then

∫((Sqrt[d Sin[e+f x]])/(((a+b Sin[e+f x]))^(3/2)))dx  ⟶  -((2 a d Cos[e+f x])/(f((a^2)-(b^2))(Sqrt[a+b Sin[e+f x]])(Sqrt[d Sin[e+f x]])))-((d^2)/((a^2)-(b^2)))∫((Sqrt[a+b Sin[e+f x]])/(((d Sin[e+f x]))^(3/2)))dx

Program code:

Int[Sqrt[d_.*sin[e_.+f_.*x_]]/(a_+b_.*sin[e_.+f_.*x_])^(3/2),x_Symbol] :=
  -2*a*d*Cos[e+f*x]/(f*(a^2-b^2)*Sqrt[a+b*Sin[e+f*x]]*Sqrt[d*Sin[e+f*x]]) - 
  d^2/(a^2-b^2)*Int[Sqrt[a+b*Sin[e+f*x]]/(d*Sin[e+f*x])^(3/2),x] /; 
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0]

2:  ∫((Sqrt[c+d Sin[e+f x]])/(((a+b Sin[e+f x]))^(3/2)))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0

Derivation: Algebraic expansion

Basis: ((Sqrt[c+d z])/(((a+b z))^(3/2)))==((c-d)/(a-b))(1/((Sqrt[a+b z]) (Sqrt[c+d z])))-((b c-a d)/(a-b))((1+z)/((((a+b z))^(3/2)) (Sqrt[c+d z])))

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0, then

∫((Sqrt[c+d Sin[e+f x]])/(((a+b Sin[e+f x]))^(3/2)))dx  ⟶  
((c-d)/(a-b))∫(1/((Sqrt[a+b Sin[e+f x]]) (Sqrt[c+d Sin[e+f x]])))dx-((b c-a d)/(a-b))∫((1+Sin[e+f x])/((((a+b Sin[e+f x]))^(3/2)) (Sqrt[c+d Sin[e+f x]])))dx

Program code:

Int[Sqrt[c_+d_.*sin[e_.+f_.*x_]]/(a_.+b_.*sin[e_.+f_.*x_])^(3/2),x_Symbol] :=
  (c-d)/(a-b)*Int[1/(Sqrt[a+b*Sin[e+f*x]]*Sqrt[c+d*Sin[e+f*x]]),x] - 
  (b*c-a*d)/(a-b)*Int[(1+Sin[e+f*x])/((a+b*Sin[e+f*x])^(3/2)*Sqrt[c+d*Sin[e+f*x]]),x] /; 
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && NeQ[c^2-d^2,0]

2:  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ m<-1 ∧ 0<n<1

Derivation: Nondegenerate sine recurrence 1a with A->1,B->0,C->0,p->0

Derivation: Nondegenerate sine recurrence 1c with A->c,B->d,C->0,n->n-1,p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ m<-1 ∧ 0<n<1, then

∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  ⟶  
-((b Cos[e+f x] (((a+b Sin[e+f x]))^(m+1)) (((c+d Sin[e+f x]))^n))/(f (m+1)((a^2)-(b^2))))+
(1/((m+1)((a^2)-(b^2))))∫(((a+b Sin[e+f x]))^(m+1)) (((c+d Sin[e+f x]))^(n-1))·
(a c (m+1)+b d n+(a d (m+1)-b c (m+2)) Sin[e+f x]-b d (m+n+2) ((Sin[e+f x])^2))dx

Program code:

Int[(a_.+b_.*sin[e_.+f_.*x_])^m_*(c_.+d_.*sin[e_.+f_.*x_])^n_,x_Symbol] :=
  -b*Cos[e+f*x]*(a+b*Sin[e+f*x])^(m+1)*(c+d*Sin[e+f*x])^n/(f*(m+1)*(a^2-b^2)) + 
  1/((m+1)*(a^2-b^2))*Int[(a+b*Sin[e+f*x])^(m+1)*(c+d*Sin[e+f*x])^(n-1)*
    Simp[a*c*(m+1)+b*d*n+(a*d*(m+1)-b*c*(m+2))*Sin[e+f*x]-b*d*(m+n+2)*Sin[e+f*x]^2,x],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && LtQ[m,-1] && LtQ[0,n,1] && IntegersQ[2*m,2*n]

2.  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ m<-1 ∧ 1<n<2

1.  ∫((((c+d Sin[e+f x]))^(3/2))/(((a+b Sin[e+f x]))^(3/2)))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0

1:  ∫((((d Sin[e+f x]))^(3/2))/(((a+b Sin[e+f x]))^(3/2)))dx  when  (a^2)-(b^2)≠0

Derivation: Algebraic expansion

Basis: ((((d z))^(3/2))/(((a+b z))^(3/2)))==((d(Sqrt[d z]))/(b (Sqrt[a+b z])))-((a d(Sqrt[d z]))/(b (((a+b z))^(3/2))))

Rule: If  (a^2)-(b^2)≠0, then

∫((((d Sin[e+f x]))^(3/2))/(((a+b Sin[e+f x]))^(3/2)))dx  ⟶  (d/b)∫((Sqrt[d Sin[e+f x]])/(Sqrt[a+b Sin[e+f x]]))dx-((a d)/b)∫((Sqrt[d Sin[e+f x]])/(((a+b Sin[e+f x]))^(3/2)))dx

Program code:

Int[(d_.*sin[e_.+f_.*x_])^(3/2)/(a_+b_.*sin[e_.+f_.*x_])^(3/2),x_Symbol] :=
  d/b*Int[Sqrt[d*Sin[e+f*x]]/Sqrt[a+b*Sin[e+f*x]],x] - 
  a*d/b*Int[Sqrt[d*Sin[e+f*x]]/(a+b*Sin[e+f*x])^(3/2),x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0]

2:  ∫((((c+d Sin[e+f x]))^(3/2))/(((a+b Sin[e+f x]))^(3/2)))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0

Derivation: Algebraic expansion

Basis: ((((c+d z))^(3/2))/(((a+b z))^(3/2)))==(((d^2) (Sqrt[a+b z]))/((b^2) (Sqrt[c+d z])))+(((b c-a d) (b c+a d+2 b d z))/((b^2) (((a+b z))^(3/2))(Sqrt[c+d z])))

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0, then

∫((((c+d Sin[e+f x]))^(3/2))/(((a+b Sin[e+f x]))^(3/2)))dx  ⟶  ((d^2)/(b^2))∫((Sqrt[a+b Sin[e+f x]])/((Sqrt[c+d Sin[e+f x]]) ))dx+(((b c-a d))/(b^2))∫((b c+a d+2 b d Sin[e+f x])/((((a+b Sin[e+f x]))^(3/2))(Sqrt[c+d Sin[e+f x]]) ))dx

Program code:

Int[(c_+d_.*sin[e_.+f_.*x_])^(3/2)/(a_.+b_.*sin[e_.+f_.*x_])^(3/2),x_Symbol] :=
  d^2/b^2*Int[Sqrt[a+b*Sin[e+f*x]]/Sqrt[c+d*Sin[e+f*x]],x] + 
  (b*c-a*d)/b^2*Int[Simp[b*c+a*d+2*b*d*Sin[e+f*x],x]/((a+b*Sin[e+f*x])^(3/2)*Sqrt[c+d*Sin[e+f*x]]),x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && NeQ[c^2-d^2,0]

2:  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ m<-1 ∧ 1<n<2

Derivation: Nondegenerate sine recurrence 1a with A->c,B->d,C->0,n->n-1,p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ m<-1 ∧ 1<n<2, then

∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  ⟶  
-(((b c-a d) Cos[e+f x] (((a+b Sin[e+f x]))^(m+1)) (((c+d Sin[e+f x]))^(n-1)))/(f (m+1)((a^2)-(b^2))))+
(1/((m+1)((a^2)-(b^2))))∫(((a+b Sin[e+f x]))^(m+1)) (((c+d Sin[e+f x]))^(n-2))·
(c (a c-b d) (m+1)+d (b c-a d) (n-1)+(d (a c-b d) (m+1)-c (b c-a d) (m+2)) Sin[e+f x]-d (b c-a d) (m+n+1) ((Sin[e+f x])^2))dx

Program code:

Int[(a_.+b_.*sin[e_.+f_.*x_])^m_*(c_.+d_.*sin[e_.+f_.*x_])^n_,x_Symbol] :=
  -(b*c-a*d)*Cos[e+f*x]*(a+b*Sin[e+f*x])^(m+1)*(c+d*Sin[e+f*x])^(n-1)/(f*(m+1)*(a^2-b^2)) + 
  1/((m+1)*(a^2-b^2))*Int[(a+b*Sin[e+f*x])^(m+1)*(c+d*Sin[e+f*x])^(n-2)*
    Simp[c*(a*c-b*d)*(m+1)+d*(b*c-a*d)*(n-1)+(d*(a*c-b*d)*(m+1)-c*(b*c-a*d)*(m+2))*Sin[e+f*x]-d*(b*c-a*d)*(m+n+1)*Sin[e+f*x]^2,x],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && LtQ[m,-1] && LtQ[1,n,2] && IntegersQ[2*m,2*n]

2.  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ m<-1 ∧ n≯0

1.  ∫(1/((((a+b Sin[e+f x]))^(3/2)) (Sqrt[c+d Sin[e+f x]])))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0

1:  ∫(1/((((a+b Sin[e+f x]))^(3/2)) (Sqrt[d Sin[e+f x]])))dx  when  (a^2)-(b^2)≠0

Derivation: Nondegenerate sine recurrence 1a with c->0,A->1,B->0,C->0,p->0,m->-(3/2),n->-(1/2)

Rule: If  (a^2)-(b^2)≠0, then

∫(1/((((a+b Sin[e+f x]))^(3/2)) (Sqrt[d Sin[e+f x]])))dx  ⟶  ((2 b Cos[e+f x])/(f((a^2)-(b^2)) (Sqrt[a+b Sin[e+f x]])(Sqrt[d Sin[e+f x]])))+(d/((a^2)-(b^2)))∫((b+a Sin[e+f x])/((Sqrt[a+b Sin[e+f x]])(((d Sin[e+f x]))^(3/2))))dx

Program code:

Int[1/((a_+b_.*sin[e_.+f_.*x_])^(3/2)*Sqrt[d_.*sin[e_.+f_.*x_]]),x_Symbol] :=
  2*b*Cos[e+f*x]/(f*(a^2-b^2)*Sqrt[a+b*Sin[e+f*x]]*Sqrt[d*Sin[e+f*x]]) + 
  d/(a^2-b^2)*Int[(b+a*Sin[e+f*x])/(Sqrt[a+b*Sin[e+f*x]]*(d*Sin[e+f*x])^(3/2)),x] /; 
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0]

2:  ∫(1/((((a+b Sin[e+f x]))^(3/2)) (Sqrt[c+d Sin[e+f x]])))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0

Derivation: Algebraic expansion

Basis: (1/(((a+b z))^(3/2)))==(1/((a-b) (Sqrt[a+b z])))-((b(1+z))/((a-b) (((a+b z))^(3/2))))

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0, then

∫(1/((((a+b Sin[e+f x]))^(3/2)) (Sqrt[c+d Sin[e+f x]])))dx  ⟶  
(1/(a-b))∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[c+d Sin[e+f x]])))dx-(b/(a-b))∫((1+Sin[e+f x])/((((a+b Sin[e+f x]))^(3/2)) (Sqrt[c+d Sin[e+f x]])))dx

Program code:

Int[1/((a_.+b_.*sin[e_.+f_.*x_])^(3/2)*Sqrt[c_.+d_.*sin[e_.+f_.*x_]]),x_Symbol] :=
  1/(a-b)*Int[1/(Sqrt[a+b*Sin[e+f*x]]*Sqrt[c+d*Sin[e+f*x]]),x] - 
  b/(a-b)*Int[(1+Sin[e+f*x])/((a+b*Sin[e+f*x])^(3/2)*Sqrt[c+d*Sin[e+f*x]]),x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && NeQ[c^2-d^2,0]

2:  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ m<-1 ∧ n≯0

Derivation: Nondegenerate sine recurrence 1c with A->1,B->0,C->0,p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ m<-1 ∧ n≯0, then

∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  ⟶  
-(((b^2) Cos[e+f x] (((a+b Sin[e+f x]))^(m+1)) (((c+d Sin[e+f x]))^(n+1)))/(f(m+1)(b c-a d)((a^2)-(b^2))))+
(1/((m+1)(b c-a d)((a^2)-(b^2))))∫(((a+b Sin[e+f x]))^(m+1)) (((c+d Sin[e+f x]))^n)·
(a (b c-a d) (m+1)+(b^2) d (m+n+2)-((b^2) c+b (b c-a d) (m+1)) Sin[e+f x]-(b^2) d (m+n+3) ((Sin[e+f x])^2))dx

Program code:

Int[(a_.+b_.*sin[e_.+f_.*x_])^m_*(c_.+d_.*sin[e_.+f_.*x_])^n_,x_Symbol] :=
  -b^2*Cos[e+f*x]*(a+b*Sin[e+f*x])^(m+1)*(c+d*Sin[e+f*x])^(n+1)/(f*(m+1)*(b*c-a*d)*(a^2-b^2)) + 
  1/((m+1)*(b*c-a*d)*(a^2-b^2))*Int[(a+b*Sin[e+f*x])^(m+1)*(c+d*Sin[e+f*x])^n*
    Simp[a*(b*c-a*d)*(m+1)+b^2*d*(m+n+2)-(b^2*c+b*(b*c-a*d)*(m+1))*Sin[e+f*x]-b^2*d*(m+n+3)*Sin[e+f*x]^2,x],x] /;
FreeQ[{a,b,c,d,e,f,n},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && LtQ[m,-1] && IntegersQ[2*m,2*n] && 
  (EqQ[a,0] && IntegerQ[m] && Not[IntegerQ[n]] || Not[IntegerQ[2*n] && LtQ[n,-1] && (IntegerQ[n] && Not[IntegerQ[m]] || EqQ[a,0])])

4:  ∫((Sqrt[c+d Sin[e+f x]])/(a+b Sin[e+f x]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0

Derivation: Algebraic expansion

Basis: ((Sqrt[c+d z])/(a+b z))==(d/(b (Sqrt[c+d z])))+((b c-a d)/(b (a+b z) (Sqrt[c+d z])))

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0, then

∫((Sqrt[c+d Sin[e+f x]])/(a+b Sin[e+f x]))dx  ⟶  (d/b)∫(1/(Sqrt[c+d Sin[e+f x]]))dx+((b c-a d)/b)∫(1/((a+b Sin[e+f x])(Sqrt[c+d Sin[e+f x]])))dx

Program code:

Int[Sqrt[c_.+d_.*sin[e_.+f_.*x_]]/(a_.+b_.*sin[e_.+f_.*x_]),x_Symbol] :=
  d/b*Int[1/Sqrt[c+d*Sin[e+f*x]],x] + 
  (b*c-a*d)/b*Int[1/((a+b*Sin[e+f*x])*Sqrt[c+d*Sin[e+f*x]]),x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && NeQ[c^2-d^2,0]

5:  ∫((((a+b Sin[e+f x]))^(3/2))/(c+d Sin[e+f x]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0

Derivation: Algebraic expansion

Basis: ((a+b z)/(c+d z))==(b/d)-((b c-a d)/(d(c+d z)))

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0, then

∫((((a+b Sin[e+f x]))^(3/2))/(c+d Sin[e+f x]))dx  ⟶  (b/d)∫(Sqrt[a+b Sin[e+f x]])dx-((b c-a d)/d)∫((Sqrt[a+b Sin[e+f x]])/(c+d Sin[e+f x]))dx

Program code:

Int[(a_.+b_.*sin[e_.+f_.*x_])^(3/2)/(c_.+d_.*sin[e_.+f_.*x_]),x_Symbol] :=
  b/d*Int[Sqrt[a+b*Sin[e+f*x]],x] - (b*c-a*d)/d*Int[Sqrt[a+b*Sin[e+f*x]]/(c+d*Sin[e+f*x]),x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && NeQ[c^2-d^2,0]

6.  ∫(1/((a+b Sin[e+f x])(Sqrt[c+d Sin[e+f x]])))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0

1:  ∫(1/((a+b Sin[e+f x])(Sqrt[c+d Sin[e+f x]])))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ c+d>0

Derivation: Primitive rule

Basis: If  c+d>0, then (∂_x)EllipticPi[((2 b)/(a+b)),(1/2) (x-(π/2)),((2 d)/(c+d))]==(((a+b) (Sqrt[c+d]))/(2 (a+b Sin[x]) (Sqrt[c+d Sin[x]])))

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ c+d>0, then

∫(1/((a+b Sin[e+f x])(Sqrt[c+d Sin[e+f x]])))dx  ⟶  (2/(f(a+b)(Sqrt[c+d])))EllipticPi[((2 b)/(a+b)),(1/2) (e-(π/2)+f x),((2 d)/(c+d))]

Program code:

Int[1/((a_.+b_.*sin[e_.+f_.*x_])*Sqrt[c_.+d_.*sin[e_.+f_.*x_]]),x_Symbol] :=
  2/(f*(a+b)*Sqrt[c+d])*EllipticPi[2*b/(a+b),1/2*(e-Pi/2+f*x),2*d/(c+d)] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && GtQ[c+d,0]

2:  ∫(1/((a+b Sin[e+f x])(Sqrt[c+d Sin[e+f x]])))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ c-d>0

Derivation: Primitive rule

Basis: If  c-d>0, then (∂_x)EllipticPi[-((2 b)/(a-b)),(1/2) (x+(π/2)),-((2 d)/(c-d))]==(((a-b) (Sqrt[c-d]))/(2 (a+b Sin[x]) (Sqrt[c+d Sin[x]])))

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ c-d>0, then

∫(1/((a+b Sin[e+f x])(Sqrt[c+d Sin[e+f x]])))dx  ⟶  (2/(f(a-b)(Sqrt[c-d])))EllipticPi[-((2 b)/(a-b)),(1/2) (e+(π/2)+f x),-((2 d)/(c-d))]

Program code:

Int[1/((a_.+b_.*sin[e_.+f_.*x_])*Sqrt[c_.+d_.*sin[e_.+f_.*x_]]),x_Symbol] :=
  2/(f*(a-b)*Sqrt[c-d])*EllipticPi[-2*b/(a-b),1/2*(e+Pi/2+f*x),-2*d/(c-d)] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && GtQ[c-d,0]

3:  ∫(1/((a+b Sin[e+f x])(Sqrt[c+d Sin[e+f x]])))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ c+d≯0

Derivation: Piecewise constant extraction

Basis: (∂_x)((Sqrt[((c+d F[x])/(c+d))])/(Sqrt[c+d F[x]]))==0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ c+d≯0, then

∫(1/((a+b Sin[e+f x])(Sqrt[c+d Sin[e+f x]])))dx  ⟶  ((Sqrt[((c+d Sin[e+f x])/(c+d))])/(Sqrt[c+d Sin[e+f x]]))∫(1/((a+b Sin[e+f x])(Sqrt[(c/(c+d))+(d/(c+d))Sin[e+f x]])))dx

Program code:

Int[1/((a_.+b_.*sin[e_.+f_.*x_])*Sqrt[c_.+d_.*sin[e_.+f_.*x_]]),x_Symbol] :=
  Sqrt[(c+d*Sin[e+f*x])/(c+d)]/Sqrt[c+d*Sin[e+f*x]]*Int[1/((a+b*Sin[e+f*x])*Sqrt[c/(c+d)+d/(c+d)*Sin[e+f*x]]),x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && Not[GtQ[c+d,0]]

7.  ∫((Sqrt[a+b Sin[e+f x]])/(Sqrt[c+d Sin[e+f x]]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0

1.  ∫((Sqrt[b Sin[e+f x]])/(Sqrt[c+d Sin[e+f x]]))dx  when  (c^2)-(d^2)≠0

1.  ∫((Sqrt[b Sin[e+f x]])/(Sqrt[c+d Sin[e+f x]]))dx  when  (c^2)-(d^2)≠0 ∧ ((c+d)/b)>0

1:  ∫((Sqrt[b Sin[e+f x]])/(Sqrt[c+d Sin[e+f x]]))dx  when  (c^2)-(d^2)>0 ∧ ((c+d)/b)>0 ∧ (c^2)>0

Rule: If  (c^2)-(d^2)>0 ∧ ((c+d)/b)>0 ∧ (c^2)>0, then

∫((Sqrt[b Sin[e+f x]])/(Sqrt[c+d Sin[e+f x]]))dx  ⟶  
((2 c (Sqrt[b(c+d)])Tan[e+f x](Sqrt[1+Csc[e+f x]])(Sqrt[1-Csc[e+f x]]))/(d f(Sqrt[(c^2)-(d^2)]))) EllipticPi[((c+d)/d),ArcSin[((Sqrt[c+d Sin[e+f x]])/(Sqrt[b Sin[e+f x]]))/(Sqrt[((c+d)/b)])],-((c+d)/(c-d))]

Program code:

Int[Sqrt[b_.*sin[e_.+f_.*x_]]/Sqrt[c_+d_.*sin[e_.+f_.*x_]],x_Symbol] :=
  2*c*Rt[b*(c+d),2]*Tan[e+f*x]*Sqrt[1+Csc[e+f*x]]*Sqrt[1-Csc[e+f*x]]/(d*f*Sqrt[c^2-d^2])*
    EllipticPi[(c+d)/d,ArcSin[Sqrt[c+d*Sin[e+f*x]]/Sqrt[b*Sin[e+f*x]]/Rt[(c+d)/b,2]],-(c+d)/(c-d)] /;
FreeQ[{b,c,d,e,f},x] && GtQ[c^2-d^2,0] && PosQ[(c+d)/b] && GtQ[c^2,0]

2:  ∫((Sqrt[b Sin[e+f x]])/(Sqrt[c+d Sin[e+f x]]))dx  when  (c^2)-(d^2)≠0 ∧ ((c+d)/b)>0

Rule: If  (c^2)-(d^2)≠0 ∧ ((c+d)/b)>0, then

∫((Sqrt[b Sin[e+f x]])/(Sqrt[c+d Sin[e+f x]]))dx  ⟶  
((2b Tan[e+f x])/(d f))(Sqrt[((c+d)/b)])(Sqrt[((c (1+Csc[e+f x]))/(c-d))])(Sqrt[((c (1-Csc[e+f x]))/(c+d))])EllipticPi[((c+d)/d),ArcSin[((Sqrt[c+d Sin[e+f x]])/(Sqrt[b Sin[e+f x]]))/(Sqrt[((c+d)/b)])],-((c+d)/(c-d))]

Program code:

Int[Sqrt[b_.*sin[e_.+f_.*x_]]/Sqrt[c_+d_.*sin[e_.+f_.*x_]],x_Symbol] :=
  2*b*Tan[e+f*x]/(d*f)*Rt[(c+d)/b,2]*Sqrt[c*(1+Csc[e+f*x])/(c-d)]*Sqrt[c*(1-Csc[e+f*x])/(c+d)]*
    EllipticPi[(c+d)/d,ArcSin[Sqrt[c+d*Sin[e+f*x]]/Sqrt[b*Sin[e+f*x]]/Rt[(c+d)/b,2]],-(c+d)/(c-d)] /;
FreeQ[{b,c,d,e,f},x] && NeQ[c^2-d^2,0] && PosQ[(c+d)/b]

2:  ∫((Sqrt[b Sin[e+f x]])/(Sqrt[c+d Sin[e+f x]]))dx  when  (c^2)-(d^2)≠0 ∧ ((c+d)/b)≯0

Derivation: Piecewise constant extraction

Basis: (∂_x)((Sqrt[F[x]])/(Sqrt[-F[x]]))==0

Rule: If  (c^2)-(d^2)≠0 ∧ ((c+d)/b)≯0, then

∫((Sqrt[b Sin[e+f x]])/(Sqrt[c+d Sin[e+f x]]))dx  ⟶  ((Sqrt[b Sin[e+f x]])/(Sqrt[-b Sin[e+f x]]))∫((Sqrt[-b Sin[e+f x]])/(Sqrt[c+d Sin[e+f x]]))dx

Program code:

Int[Sqrt[b_.*sin[e_.+f_.*x_]]/Sqrt[c_+d_.*sin[e_.+f_.*x_]],x_Symbol] :=
  Sqrt[b*Sin[e+f*x]]/Sqrt[-b*Sin[e+f*x]]*Int[Sqrt[-b*Sin[e+f*x]]/Sqrt[c+d*Sin[e+f*x]],x] /;
FreeQ[{b,c,d,e,f},x] && NeQ[c^2-d^2,0] && NegQ[(c+d)/b]

2.  ∫((Sqrt[a+b Sin[e+f x]])/(Sqrt[c+d Sin[e+f x]]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0

x:  ∫((Sqrt[a+b Sin[e+f x]])/(Sqrt[d Sin[e+f x]]))dx  when  (a^2)-(b^2)≠0

Derivation: Algebraic expansion

Basis: ((Sqrt[a+b z])/(Sqrt[d z]))==(a/((Sqrt[a+b z])(Sqrt[d z])))+((b (Sqrt[d z]))/(d(Sqrt[a+b z])))

Rule: If  (a^2)-(b^2)≠0, then

∫((Sqrt[a+b Sin[e+f x]])/(Sqrt[d Sin[e+f x]]))dx  ⟶  a∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[d Sin[e+f x]])))dx+(b/d)∫((Sqrt[d Sin[e+f x]])/(Sqrt[a+b Sin[e+f x]]))dx

Program code:

(* Int[Sqrt[a_+b_.*sin[e_.+f_.*x_]]/Sqrt[d_.*sin[e_.+f_.*x_]],x_Symbol] :=
  a*Int[1/(Sqrt[a+b*Sin[e+f*x]]*Sqrt[d*Sin[e+f*x]]),x] + 
  b/d*Int[Sqrt[d*Sin[e+f*x]]/Sqrt[a+b*Sin[e+f*x]],x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0] *)

x:  ∫((Sqrt[a+b Sin[e+f x]])/(Sqrt[d Sin[e+f x]]))dx  when  (a^2)-(b^2)≠0 ∧ ((a+b)/d)>0

Rule: If  (a^2)-(b^2)≠0 ∧ ((a+b)/d)>0, then

∫((Sqrt[a+b Sin[e+f x]])/(Sqrt[d Sin[e+f x]]))dx  ⟶  
((2 (a+b Sin[e+f x]))/(d f (Sqrt[((a+b)/d)]) Cos[e+f x])) (Sqrt[((a (1-Sin[e+f x]))/(a+b Sin[e+f x]))]) (Sqrt[((a (1+Sin[e+f x]))/(a+b Sin[e+f x]))]) EllipticPi[(b/(a+b)),ArcSin[(Sqrt[((a+b)/d)])((Sqrt[d Sin[e+f x]])/(Sqrt[a+b Sin[e+f x]]))],-((a-b)/(a+b))]

Program code:

(* Int[Sqrt[a_+b_.*sin[e_.+f_.*x_]]/Sqrt[d_.*sin[e_.+f_.*x_]],x_Symbol] :=
  2*(a+b*Sin[e+f*x])/(d*f*Rt[(a+b)/d,2]*Cos[e+f*x])*Sqrt[a*(1-Sin[e+f*x])/(a+b*Sin[e+f*x])]*Sqrt[a*(1+Sin[e+f*x])/(a+b*Sin[e+f*x])]*
    EllipticPi[b/(a+b),ArcSin[Rt[(a+b)/d,2]*(Sqrt[d*Sin[e+f*x]]/Sqrt[a+b*Sin[e+f*x]])],-(a-b)/(a+b)] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0] && PosQ[(a+b)/d] *)

1:  ∫((Sqrt[a+b Sin[e+f x]])/(Sqrt[c+d Sin[e+f x]]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ ((a+b)/(c+d))>0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ ((a+b)/(c+d))>0, then

∫((Sqrt[a+b Sin[e+f x]])/(Sqrt[c+d Sin[e+f x]]))dx  ⟶  
((2(a+b Sin[e+f x]))/(d f (Sqrt[((a+b)/(c+d))]) Cos[e+f x]))(Sqrt[(((b c-a d) (1+Sin[e+f x]))/((c-d) (a+b Sin[e+f x])))])(Sqrt[-(((b c-a d) (1-Sin[e+f x]))/((c+d) (a+b Sin[e+f x])))])EllipticPi[((b (c+d))/(d(a+b))),ArcSin[(Sqrt[((a+b)/(c+d))])((Sqrt[c+d Sin[e+f x]])/(Sqrt[a+b Sin[e+f x]]))],(((a-b) (c+d))/((a+b) (c-d)))]

Program code:

Int[Sqrt[a_+b_.*sin[e_.+f_.*x_]]/Sqrt[c_.+d_.*sin[e_.+f_.*x_]],x_Symbol] :=
  2*(a+b*Sin[e+f*x])/(d*f*Rt[(a+b)/(c+d),2]*Cos[e+f*x])*
    Sqrt[(b*c-a*d)*(1+Sin[e+f*x])/((c-d)*(a+b*Sin[e+f*x]))]*
    Sqrt[-(b*c-a*d)*(1-Sin[e+f*x])/((c+d)*(a+b*Sin[e+f*x]))]*
    EllipticPi[b*(c+d)/(d*(a+b)),ArcSin[Rt[(a+b)/(c+d),2]*Sqrt[c+d*Sin[e+f*x]]/Sqrt[a+b*Sin[e+f*x]]],(a-b)*(c+d)/((a+b)*(c-d))] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && PosQ[(a+b)/(c+d)]

2:  ∫((Sqrt[a+b Sin[e+f x]])/(Sqrt[c+d Sin[e+f x]]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ ((a+b)/(c+d))≯0

Derivation: Piecewise constant extraction

Basis: (∂_x)((Sqrt[F[x]])/(Sqrt[-F[x]]))==0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ ((a+b)/(c+d))≯0, then

∫((Sqrt[a+b Sin[e+f x]])/(Sqrt[c+d Sin[e+f x]]))dx  ⟶  ((Sqrt[-c-d Sin[e+f x]])/(Sqrt[c+d Sin[e+f x]]))∫((Sqrt[a+b Sin[e+f x]])/(Sqrt[-c-d Sin[e+f x]]))dx

Program code:

Int[Sqrt[a_+b_.*sin[e_.+f_.*x_]]/Sqrt[c_.+d_.*sin[e_.+f_.*x_]],x_Symbol] :=
  Sqrt[-c-d*Sin[e+f*x]]/Sqrt[c+d*Sin[e+f*x]]*Int[Sqrt[a+b*Sin[e+f*x]]/Sqrt[-c-d*Sin[e+f*x]],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && NegQ[(a+b)/(c+d)]

8.  ∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[c+d Sin[e+f x]])))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0

1.  ∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[d Sin[e+f x]])))dx  when  (a^2)-(b^2)≠0

1.  ∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[d Sin[e+f x]])))dx  when  (a^2)-(b^2)<0 ∧ (b^2)>0

1:  ∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[d Sin[e+f x]])))dx  when  (a^2)-(b^2)<0 ∧ (d^2)==1 ∧ b d>0

Derivation: Integration by substitution

Basis: If  (a^2)-(b^2)<0 ∧ (d^2)==1 ∧ b d>0, then (1/((Sqrt[a+b Sin[e+f x]])(Sqrt[d Sin[e+f x]])))==-((2 d)/(f(Sqrt[a+b d])))Subst[(1/( (Sqrt[1-(x^2)]) (Sqrt[1+(((a-b d) (x^2))/(a+b d))]))),x,((Cos[e+f x])/(1+d Sin[e+f x]))](∂_x)((Cos[e+f x])/(1+d Sin[e+f x]))

Rule: If  (a^2)-(b^2)<0 ∧ (d^2)==1 ∧ b d>0, then

∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[d Sin[e+f x]])))dx  ⟶  -((2 d)/(f(Sqrt[a+b d])))Subst[∫(1/( (Sqrt[1-(x^2)]) (Sqrt[1+(((a-b d) (x^2))/(a+b d))])))dx,x,((Cos[e+f x])/(1+d Sin[e+f x]))]
  ⟶  -((2 d)/(f (Sqrt[a+b d])))EllipticF[ArcSin[((Cos[e+f x])/(1+d Sin[e+f x]))],-((a-b d)/(a+b d))]

Program code:

Int[1/(Sqrt[a_+b_.*sin[e_.+f_.*x_]]*Sqrt[d_.*sin[e_.+f_.*x_]]),x_Symbol] :=
  -2*d/(f*Sqrt[a+b*d])*EllipticF[ArcSin[Cos[e+f*x]/(1+d*Sin[e+f*x])],-(a-b*d)/(a+b*d)] /;
FreeQ[{a,b,d,e,f},x] && LtQ[a^2-b^2,0] && EqQ[d^2,1] && GtQ[b*d,0]

2:  ∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[d Sin[e+f x]])))dx  when  (a^2)-(b^2)<0 ∧ (b^2)>0 ∧ ¬((d^2)==1 ∧ b d>0)

Derivation: Piecewise constant extraction

Basis: (∂_x)((Sqrt[b F[x]])/(Sqrt[d F[x]]))==0

Rule: If  (a^2)-(b^2)<0 ∧ (b^2)>0 ∧ ¬((d^2)==1 ∧ b d>0), then

∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[d Sin[e+f x]])))dx  ⟶  ((Sqrt[Sign[b] Sin[e+f x]])/(Sqrt[d Sin[e+f x]]))∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[Sign[b]Sin[e+f x]])))dx

Program code:

Int[1/(Sqrt[a_+b_.*sin[e_.+f_.*x_]]*Sqrt[d_.*sin[e_.+f_.*x_]]),x_Symbol] :=
  Sqrt[Sign[b]*Sin[e+f*x]]/Sqrt[d*Sin[e+f*x]]*Int[1/(Sqrt[a+b*Sin[e+f*x]]*Sqrt[Sign[b]*Sin[e+f*x]]),x] /;
FreeQ[{a,b,d,e,f},x] && LtQ[a^2-b^2,0] && GtQ[b^2,0] && Not[EqQ[d^2,1] && GtQ[b*d,0]]

2.  ∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[d Sin[e+f x]])))dx  when  (a^2)-(b^2)≠0 ∧ ((a+b)/d)>0

1:  ∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[d Sin[e+f x]])))dx  when  (a^2)-(b^2)>0 ∧ ((a+b)/d)>0 ∧ (a^2)>0

Rule: If  (a^2)-(b^2)>0 ∧ ((a+b)/d)>0 ∧ (a^2)>0, then

∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[d Sin[e+f x]])))dx  ⟶  -((2 (Sqrt[(a^2)])(Sqrt[-((Cot[e+f x])^2)]))/(a f(Sqrt[(a^2)-(b^2)])Cot[e+f x]))(Sqrt[((a+b)/d)]) EllipticF[ArcSin[(( (Sqrt[a+b Sin[e+f x]]))/(Sqrt[d Sin[e+f x]]))/(Sqrt[((a+b)/d)])],-((a+b)/(a-b))]

Program code:

Int[1/(Sqrt[a_+b_.*sin[e_.+f_.*x_]]*Sqrt[d_.*sin[e_.+f_.*x_]]),x_Symbol] :=
  -2*Sqrt[a^2]*Sqrt[-Cot[e+f*x]^2]/(a*f*Sqrt[a^2-b^2]*Cot[e+f*x])*Rt[(a+b)/d,2]*
    EllipticF[ArcSin[Sqrt[a+b*Sin[e+f*x]]/Sqrt[d*Sin[e+f*x]]/Rt[(a+b)/d,2]],-(a+b)/(a-b)] /;
FreeQ[{a,b,d,e,f},x] && GtQ[a^2-b^2,0] && PosQ[(a+b)/d] && GtQ[a^2,0]

2:  ∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[d Sin[e+f x]])))dx  when  (a^2)-(b^2)≠0 ∧ ((a+b)/d)>0

Rule: If  (a^2)-(b^2)≠0 ∧ ((a+b)/d)>0, then

∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[d Sin[e+f x]])))dx  ⟶  
-((2Tan[e+f x])/(a f))(Sqrt[((a+b)/d)])(Sqrt[((a (1-Csc[e+f x]))/(a+b))]) (Sqrt[((a (1+Csc[e+f x]))/(a-b))])EllipticF[ArcSin[((Sqrt[a+b Sin[e+f x]])/(Sqrt[d Sin[e+f x]]))/(Sqrt[((a+b)/d)])],-((a+b)/(a-b))]

Program code:

Int[1/(Sqrt[a_+b_.*sin[e_.+f_.*x_]]*Sqrt[d_.*sin[e_.+f_.*x_]]),x_Symbol] :=
  -2*Tan[e+f*x]/(a*f)*Rt[(a+b)/d,2]*Sqrt[a*(1-Csc[e+f*x])/(a+b)]*Sqrt[a*(1+Csc[e+f*x])/(a-b)]*
    EllipticF[ArcSin[Sqrt[a+b*Sin[e+f*x]]/Sqrt[d*Sin[e+f*x]]/Rt[(a+b)/d,2]],-(a+b)/(a-b)] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0] && PosQ[(a+b)/d]

3:  ∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[d Sin[e+f x]])))dx  when  (a^2)-(b^2)≠0 ∧ ((a+b)/d)≯0

Derivation: Piecewise constant extraction

Basis: (∂_x)((Sqrt[-F[x]])/(Sqrt[F[x]]))==0

Rule: If  (a^2)-(b^2)≠0 ∧ ((a+b)/d)≯0, then

∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[d Sin[e+f x]])))dx  ⟶  ((Sqrt[-d Sin[e+f x]])/(Sqrt[d Sin[e+f x]]))∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[-d Sin[e+f x]])))dx

Program code:

Int[1/(Sqrt[a_+b_.*sin[e_.+f_.*x_]]*Sqrt[d_.*sin[e_.+f_.*x_]]),x_Symbol] :=
  Sqrt[-d*Sin[e+f*x]]/Sqrt[d*Sin[e+f*x]]*Int[1/(Sqrt[a+b*Sin[e+f*x]]*Sqrt[-d*Sin[e+f*x]]),x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0] && NegQ[(a+b)/d]

2.  ∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[c+d Sin[e+f x]])))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0

1:  ∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[c+d Sin[e+f x]])))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ ((c+d)/(a+b))>0

Note: Alternative antiderivative contributed via email by Martin Welz on 12 April 2014.

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ ((c+d)/(a+b))>0, then

∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[c+d Sin[e+f x]])))dx  ⟶  
((2(c+d Sin[e+f x]))/(f (b c-a d)(Sqrt[((c+d)/(a+b))])Cos[e+f x]))(Sqrt[(((b c-a d) (1-Sin[e+f x]))/((a+b) (c+d Sin[e+f x])))]) (Sqrt[-(((b c-a d) (1+Sin[e+f x]))/((a-b) (c+d Sin[e+f x])))])EllipticF[ArcSin[(Sqrt[((c+d)/(a+b))])((Sqrt[a+b Sin[e+f x]])/(Sqrt[c+d Sin[e+f x]]))],(((a+b) (c-d))/((a-b) (c+d)))]

∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[c+d Sin[e+f x]])))dx  ⟶  
((2 (1-Sin[e+f x]))/(f(Sqrt[-((a+b)/(a-b))]) (Sqrt[a+b Sin[e+f x]]) (Sqrt[c+d Sin[e+f x]])))(Sqrt[((a+b Sin[e+f x])/((a-b) (1-Sin[e+f x])))]) (Sqrt[((c+d Sin[e+f x])/((c-d) (1-Sin[e+f x])))])EllipticF[ArcSin[(Sqrt[-((a+b)/(a-b))]) ((1+Sin[e+f x])/(Cos[e+f x]))],(((a-b) (c+d))/((a+b) (c-d)))]

Program code:

Int[1/(Sqrt[a_+b_.*sin[e_.+f_.*x_]]*Sqrt[c_+d_.*sin[e_.+f_.*x_]]),x_Symbol] :=
  2*(c+d*Sin[e+f*x])/(f*(b*c-a*d)*Rt[(c+d)/(a+b),2]*Cos[e+f*x])*
    Sqrt[(b*c-a*d)*(1-Sin[e+f*x])/((a+b)*(c+d*Sin[e+f*x]))]*
    Sqrt[-(b*c-a*d)*(1+Sin[e+f*x])/((a-b)*(c+d*Sin[e+f*x]))]*
    EllipticF[ArcSin[Rt[(c+d)/(a+b),2]*(Sqrt[a+b*Sin[e+f*x]]/Sqrt[c+d*Sin[e+f*x]])],(a+b)*(c-d)/((a-b)*(c+d))] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && PosQ[(c+d)/(a+b)]

2:  ∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[c+d Sin[e+f x]])))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ ((c+d)/(a+b))≯0

Derivation: Piecewise constant extraction

Basis: (∂_x)((Sqrt[-F[x]])/(Sqrt[F[x]]))==0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ ((c+d)/(a+b))≯0, then

∫(1/((Sqrt[a+b Sin[e+f x]])(Sqrt[c+d Sin[e+f x]])))dx  ⟶  ((Sqrt[-a-b Sin[e+f x]])/(Sqrt[a+b Sin[e+f x]]))∫(1/((Sqrt[-a-b Sin[e+f x]])(Sqrt[c+d Sin[e+f x]])))dx

Program code:

Int[1/(Sqrt[a_.+b_.*sin[e_.+f_.*x_]]*Sqrt[c_+d_.*sin[e_.+f_.*x_]]),x_Symbol] :=
  Sqrt[-a-b*Sin[e+f*x]]/Sqrt[a+b*Sin[e+f*x]]*Int[1/(Sqrt[-a-b*Sin[e+f*x]]*Sqrt[c+d*Sin[e+f*x]]),x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && NegQ[(c+d)/(a+b)]

9:  ∫((((d Sin[e+f x]))^(3/2))/(Sqrt[a+b Sin[e+f x]]))dx  when  (a^2)-(b^2)≠0

Derivation: Algebraic expansion

Basis: (((d z))^(3/2))==-((a d(Sqrt[d z]))/(2 b))+((d(Sqrt[d z]) (a+2 b z))/(2 b))

Rule: If  (a^2)-(b^2)≠0, then

∫((((d Sin[e+f x]))^(3/2))/(Sqrt[a+b Sin[e+f x]]))dx  ⟶  -((a d)/(2b))∫((Sqrt[d Sin[e+f x]])/(Sqrt[a+b Sin[e+f x]]))dx+(d/(2b))∫(((Sqrt[d Sin[e+f x]]) (a+2 b Sin[e+f x]))/(Sqrt[a+b Sin[e+f x]]))dx

Program code:

Int[(d_.*sin[e_.+f_.*x_])^(3/2)/Sqrt[a_.+b_.*sin[e_.+f_.*x_]],x_Symbol] :=
  -a*d/(2*b)*Int[Sqrt[d*Sin[e+f*x]]/Sqrt[a+b*Sin[e+f*x]],x] + 
  d/(2*b)*Int[Sqrt[d*Sin[e+f*x]]*(a+2*b*Sin[e+f*x])/Sqrt[a+b*Sin[e+f*x]],x] /;
FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0]

10:  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ 0<m<2 ∧ -1<n<2

Derivation: Nondegenerate sine recurrence 1b with A->a c,B->b c+a d,C->b d,m->m-1,n->n-1,p->0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0 ∧ 0<m<2 ∧ -1<n<2, then

∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  ⟶  
-((b Cos[e+f x] (((a+b Sin[e+f x]))^(m-1)) (((c+d Sin[e+f x]))^n))/(f (m+n)))+
(1/(d (m+n)))∫(((a+b Sin[e+f x]))^(m-2)) (((c+d Sin[e+f x]))^(n-1))·
((a^2) c d (m+n)+b d (b c (m-1)+a d n)+(a d (2 b c+a d) (m+n)-b d (a c-b d (m+n-1))) Sin[e+f x]+b d (b c n+a d (2 m+n-1)) ((Sin[e+f x])^2))dx

Program code:

Int[(a_.+b_.*sin[e_.+f_.*x_])^m_*(c_.+d_.*sin[e_.+f_.*x_])^n_,x_Symbol] :=
  -b*Cos[e+f*x]*(a+b*Sin[e+f*x])^(m-1)*(c+d*Sin[e+f*x])^n/(f*(m+n)) + 
  1/(d*(m+n))*Int[(a+b*Sin[e+f*x])^(m-2)*(c+d*Sin[e+f*x])^(n-1)*
    Simp[a^2*c*d*(m+n)+b*d*(b*c*(m-1)+a*d*n)+
      (a*d*(2*b*c+a*d)*(m+n)-b*d*(a*c-b*d*(m+n-1)))*Sin[e+f*x]+
      b*d*(b*c*n+a*d*(2*m+n-1))*Sin[e+f*x]^2,x],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && LtQ[0,m,2] && LtQ[-1,n,2] && NeQ[m+n,0] && 
  (IntegerQ[m] || IntegersQ[2*m,2*n])

11:  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when b c-a d≠0 ∧ m∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

Basis: a+b z==((b (c+d z))/d)-((b c-a d)/d)

Rule: If  b c-a d≠0 ∧ m∈(SuperPlus[ℤ]), then

∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  ⟶  
(b/d)∫(((a+b Sin[e+f x]))^(m-1)) (((c+d Sin[e+f x]))^(n+1))dx-((b c-a d)/d)∫(((a+b Sin[e+f x]))^(m-1)) (((c+d Sin[e+f x]))^n)dx

Program code:

Int[(a_.+b_.*sin[e_.+f_.*x_])^m_*(c_.+d_.*sin[e_.+f_.*x_])^n_,x_Symbol] :=
  b/d*Int[(a+b*Sin[e+f*x])^(m-1)*(c+d*Sin[e+f*x])^(n+1),x] - 
  (b*c-a*d)/d*Int[(a+b*Sin[e+f*x])^(m-1)*(c+d*Sin[e+f*x])^n,x] /;
FreeQ[{a,b,c,d,e,f,n},x] && NeQ[b*c-a*d,0] && IGtQ[m,0]

12.  ∫(((d Sin[e+f x]))^n) (((a+b Sin[e+f x]))^m)dx  when  (a^2)-(b^2)==0 ∧ m∈(SuperMinus[ℤ])

1:  ∫((((d Sin[e+f x]))^n)/(a+b Sin[e+f x]))dx  when  (a^2)-(b^2)≠0

Derivation: Algebraic expansion

Basis: (1/(a+b z))==(a/((a^2)-(b^2) (z^2)))-((b z)/((a^2)-(b^2) (z^2)))

Rule: If  (a^2)-(b^2)≠0, then

∫((((d Sin[e+f x]))^n)/(a+b Sin[e+f x]))dx  ⟶  a ∫((((d Sin[e+f x]))^n)/((a^2)-(b^2) ((Sin[e+f x])^2)))dx-(b/d) ∫((((d Sin[e+f x]))^(n+1))/((a^2)-(b^2) ((Sin[e+f x])^2)))dx

Program code:

Int[(d_.*sin[e_.+f_.*x_])^n_./(a_+b_.*sin[e_.+f_.*x_]),x_Symbol] :=
  a*Int[(d*Sin[e+f*x])^n/(a^2-b^2*Sin[e+f*x]^2),x] - 
  b/d*Int[(d*Sin[e+f*x])^(n+1)/(a^2-b^2*Sin[e+f*x]^2),x] /;
FreeQ[{a,b,d,e,f,n},x] && NeQ[a^2-b^2,0]

2:  ∫(((d Sin[e+f x]))^n) (((a+b Sin[e+f x]))^m)dx  when  (a^2)-(b^2)≠0 ∧ m+1∈(SuperMinus[ℤ])

Derivation: Algebraic expansion

Basis: (1/(a+b z))==((a-b z)/((a^2)-(b^2) (z^2)))

Rule: If  (a^2)-(b^2)≠0 ∧ m+1∈(SuperMinus[ℤ]), then

∫(((d Sin[e+f x]))^n) (((a+b Sin[e+f x]))^m)dx  ⟶  ∫ExpandTrig[(((((d Sin[e+f x]))^n) (((a-b Sin[e+f x]))^(-m)))/((((a^2)-(b^2) ((Sin[e+f x])^2)))^(-m))),x]dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_.*(d_.*sin[e_.+f_.*x_])^n_.,x_Symbol] :=
  Int[ExpandTrig[(d*sin[e+f*x])^n*(a-b*sin[e+f*x])^(-m)/(a^2-b^2*sin[e+f*x]^2)^(-m),x],x] /;
FreeQ[{a,b,d,e,f,n},x] && NeQ[a^2-b^2,0] && ILtQ[m,-1]

X:  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0, then

∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx  ⟶  ∫(((a+b Sin[e+f x]))^m) (((c+d Sin[e+f x]))^n)dx

Program code:

Int[(a_.+b_.*sin[e_.+f_.*x_])^m_*(c_.+d_.*sin[e_.+f_.*x_])^n_,x_Symbol] :=
  Unintegrable[(a+b*Sin[e+f*x])^m*(c+d*Sin[e+f*x])^n,x] /;
FreeQ[{a,b,c,d,e,f,m,n},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && NeQ[c^2-d^2,0]

Rules for integrands of the form (((a+b Sin[e+f x]))^m) (((c (((d Sin[e+f x]))^p)))^n)

x:  ∫(((a+b Sin[e+f x]))^m) (((d Csc[e+f x]))^n)dx  when  n∉ℤ ∧ m∈ℤ

Derivation: Algebraic normalization

Basis: If  m∈ℤ, then (((a+b Sin[z]))^m)==(((d^m)(((b+a Csc[z]))^m))/(((d Csc[z]))^m))

Note: Although this rule does not introduce a piecewise constant factor, it is better to stay in the sine/cosine world than the secant/cosecant world.

Rule: If  n∉ℤ ∧ m∈ℤ, then

∫(((a+b Sin[e+f x]))^m) (((d Csc[e+f x]))^n)dx  ⟶  (d^m)∫(((d Csc[e+f x]))^(n-m)) (((b+a Csc[e+f x]))^m)dx

Program code:

(* Int[(a_.+b_.*sin[e_.+f_.*x_])^m_.*(d_./sin[e_.+f_.*x_])^n_,x_Symbol] :=
  d^m*Int[(d*Csc[e+f*x])^(n-m)*(b+a*Csc[e+f*x])^m,x] /;
FreeQ[{a,b,d,e,f,n},x] && Not[IntegerQ[n]] && IntegerQ[m] *)

(* Int[(a_.+b_.*cos[e_.+f_.*x_])^m_.*(d_./cos[e_.+f_.*x_])^n_,x_Symbol] :=
  d^m*Int[(d*Sec[e+f*x])^(n-m)*(b+a*Sec[e+f*x])^m,x] /;
FreeQ[{a,b,d,e,f,n},x] && Not[IntegerQ[n]] && IntegerQ[m] *)

1:  ∫(((a+b Sin[e+f x]))^m) (((c (((d Sin[e+f x]))^p)))^n)dx  when  n∉ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)((((c (((d Sin[e+f x]))^p)))^n)/(((d Sin[e+f x]))^(n p)))==0

Rule: If  n∉ℤ, then

∫(((a+b Sin[e+f x]))^m) (((c (((d Sin[e+f x]))^p)))^n)dx  ⟶  (((c^(IntPart[n])) (((c (((d Sin[e+f x]))^p)))^(FracPart[n])))/(((d Sin[e+f x]))^(p FracPart[n])))∫(((a+b Sin[e+f x]))^m) (((d Sin[e+f x]))^(n p))dx

Program code:

Int[(a_.+b_.*sin[e_.+f_.*x_])^m_.*(c_.*(d_.*sin[e_.+f_.*x_])^p_)^n_,x_Symbol] :=
  c^IntPart[n]*(c*(d*Sin[e + f*x])^p)^FracPart[n]/(d*Sin[e + f*x])^(p*FracPart[n])*
    Int[(a+b*Sin[e+f*x])^m*(d*Sin[e+f*x])^(n*p),x] /;
FreeQ[{a,b,c,d,e,f,m,n,p},x] && Not[IntegerQ[n]]

Int[(a_.+b_.*cos[e_.+f_.*x_])^m_.*(c_.*(d_.*cos[e_.+f_.*x_])^p_)^n_,x_Symbol] :=
  c^IntPart[n]*(c*(d*Cos[e + f*x])^p)^FracPart[n]/(d*Cos[e + f*x])^(p*FracPart[n])*
    Int[(a+b*Cos[e+f*x])^m*(d*Cos[e+f*x])^(n*p),x] /;
FreeQ[{a,b,c,d,e,f,m,n,p},x] && Not[IntegerQ[n]]

Rules for integrands of the form (((a+b Sin[e+f x]))^m)(((c+d Csc[e+f x]))^n)

1:  ∫(((a+b Sin[e+f x]))^m) (((c+d Csc[e+f x]))^n)dx  when n∈ℤ

Derivation: Algebraic normalization

Basis: c+d Csc[z]==((d+c Sin[z])/(Sin[z]))

Rule: If  n∈ℤ, then

∫(((a+b Sin[e+f x]))^m) (((c+d Csc[e+f x]))^n)dx  ⟶  ∫(((((a+b Sin[e+f x]))^m) (((d+c Sin[e+f x]))^n))/((Sin[e+f x])^n)) dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_.*(c_+d_.*csc[e_.+f_.*x_])^n_.,x_Symbol] :=
  Int[(a+b*Sin[e+f*x])^m*(d+c*Sin[e+f*x])^n/Sin[e+f*x]^n,x] /;
FreeQ[{a,b,c,d,e,f,m},x] && IntegerQ[n]

2.  ∫(((a+b Sin[e+f x]))^m) (((c+d Csc[e+f x]))^n) dx  when n∉ℤ

1:  ∫(((a+b Sin[e+f x]))^m) (((c+d Csc[e+f x]))^n)dx  when n∉ℤ ∧ m∈ℤ

Derivation: Algebraic normalization

Basis: a+b Sin[z]==((b+a Csc[z])/(Csc[z]))

Rule: If  n∉ℤ ∧ m∈ℤ, then

∫(((a+b Sin[e+f x]))^m) (((c+d Csc[e+f x]))^n)dx  ⟶  ∫(((((b+a Csc[e+f x]))^m) (((c+d Csc[e+f x]))^n))/((Csc[e+f x])^m)) dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_.*(c_+d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  Int[(b+a*Csc[e+f*x])^m*(c+d*Csc[e+f*x])^n/Csc[e+f*x]^m,x] /;
FreeQ[{a,b,c,d,e,f,n},x] && Not[IntegerQ[n]] && IntegerQ[m]

Int[(a_+b_.*cos[e_.+f_.*x_])^m_.*(c_+d_.*sec[e_.+f_.*x_])^n_,x_Symbol] :=
  Int[(b+a*Sec[e+f*x])^m*(c+d*Sec[e+f*x])^n/Sec[e+f*x]^m,x] /;
FreeQ[{a,b,c,d,e,f,n},x] && Not[IntegerQ[n]] && IntegerQ[m]

2:  ∫(((a+b Sin[e+f x]))^m) (((c+d Csc[e+f x]))^n)dx  when n∉ℤ ∧ m∉ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)(((((c+d Csc[e+f x]))^n) ((Sin[e+f x])^n))/(((d+c Sin[e+f x]))^n))==0

Rule: If  n∉ℤ ∧ m∉ℤ, then

∫(((a+b Sin[e+f x]))^m) (((c+d Csc[e+f x]))^n)dx  ⟶  (((((c+d Csc[e+f x]))^n) ((Sin[e+f x])^n))/(((d+c Sin[e+f x]))^n))∫(((((a+b Sin[e+f x]))^m) (((d+c Sin[e+f x]))^n))/((Sin[e+f x])^n)) dx

Program code:

Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_+d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  Sin[e+f*x]^n*(c+d*Csc[e+f*x])^n/(d+c*Sin[e+f*x])^n*Int[(a+b*Sin[e+f*x])^m*(d+c*Sin[e+f*x])^n/Sin[e+f*x]^n,x] /;
FreeQ[{a,b,c,d,e,f,m,n},x] && Not[IntegerQ[n]] && Not[IntegerQ[m]]

Int[(a_+b_.*cos[e_.+f_.*x_])^m_*(c_+d_.*sec[e_.+f_.*x_])^n_,x_Symbol] :=
  Cos[e+f*x]^n*(c+d*Sec[e+f*x])^n/(d+c*Cos[e+f*x])^n*Int[(a+b*Cos[e+f*x])^m*(d+c*Cos[e+f*x])^n/Cos[e+f*x]^n,x] /;
FreeQ[{a,b,c,d,e,f,m,n},x] && Not[IntegerQ[n]] && Not[IntegerQ[m]]